Skip to content

Syntax highlighting breaks (permanently?) after editing long strings #171

Description

@AvariciousImp

When editing long strings on a single line (several thousand characters, as I didn't know I could use \ for things other than making " not end the string), the syntax highlighting starts to struggle as expected, but after saving the document as text, the highlighting stopped registering \ as a valid escape character for strings, and later, the highlighting simply stopped working entirely for all Twee languages, seemingly permanently and for all documents, not just the offending one.

Expected behavior:
The syntax highlighting for all languages stops working after hitting VS Code's max tokenization limit for the line, then resumes functioning once the offending line is removed.

What actually happened:
Syntax highlighting worked until after saving, at which point it malfunctioned, showing the wrong colors and ignoring escape characters. Some amount of time later, it stopped highlighting text completely, but only for Twee3 languages. Other languages remain unaffected.

Steps to reproduce:
Make a several thousand character long string on a single line (maybe some Lorem Ipsum or something), and save it as a text file.

Fixes attempted:
Disabling/re-enabling the extension - no effect.
Uninstalling/reinstalling the extension - no effect.
Uninstalling/reinstalling VS Code - no effect.

An example of the highlighting not functioning for anything besides brackets.
image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions