Skip to content

JsDoc in HTML files syntax highlight #109

@alexr00

Description

@alexr00

Originally from @Laser42 in microsoft/vscode#98575

  • VSCode Version: 1.45.1
  • OS Version: Windows 10 Pro x64

JsDoc comments highlights incorrectly when editing html files.

Steps to Reproduce:

  1. Create a HTML file
  2. Add <script></script> section as follows:
<script>

    /**
     * A function
     * @param {string} arg - string argument
     * @returns {null} - desc
     */
    function MyFunc(arg) {
        return null;
    }
    /**
     * A class
     */
    class MyClass {
        /**
         * Ctor
         * @param {string} field - desc
         */
        constructor(field) {
            this.field = field;
        }
    }

</script>
  1. Note that JsDoc syntax inside class has a highlight, while there is no syntax highlight for function's JsDoc:
    image

Does this issue occur when all extensions are disabled?: Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions