Skip to content

Typing a heading tag in an empty line (excluding spaces) breaks the HTML syntax highlighting #724

@GreenAxol35

Description

@GreenAxol35

Basically what the title says.

It seems this is somehow related to the amount of text in a file. I get this bug at around 4000 characters (including spaces).

This only happens when you type a number after an h, plus it only seems to break if the only symbols you type on a line is whitespace and the tag.

Steps to reproduce

  1. Create a new file and set the highlighting to HTML mode
  2. Write or paste a sufficiently large file (~4000 characters or larger)
  3. Try to type <h1> or another heading tag on its own line.

After these steps, xed will freeze for a moment, and after that the highlighting will be gone.

My workarounds

This seems to not happen using the ERB (HTML) highlighting mode. This highlighter is similar to the normal HTML highlighter, but does not crash when typing the tags above.

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