syntect icon indicating copy to clipboard operation
syntect copied to clipboard

Hang while highlighting JavaScript using Packages#v4050

Open Nemo157 opened this issue 1 year ago • 7 comments

When attempting to highlight some JS code we noticed that it would never return and just spin consuming a full core. We're using syntect with a custom pack built from mostly https://github.com/sublimehq/Packages/releases/tag/v4050. The code:

{
    // this is an inline comment

    "foo": "bar" // another inline comment

    /*
       This is a block comment
       that continues on another line
    */
}

This hangs while parsing the /* line. I've pushed a complete testcase, but since this requires a newer version of sublimehq/Packages than currently tested against I expect that this would need a smaller syntax file to be synthesized for a proper testcase.

Nemo157 avatar Dec 01 '22 17:12 Nemo157