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

Open
#724 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c, html
Domain
desktop

Research direction

Start by reproducing the freeze in xed's HTML highlighting mode with a file of about 4,000 characters, then compare it with the ERB (HTML) mode mentioned in the report. Done means typing a heading tag such as

on a whitespace-only line no longer freezes xed or removes HTML highlighting.

Written by the indexing model from the issue text.

Description

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.

Dominant language
C
Stars
551
Forks
115
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from linuxmint/xed

All issues in linuxmint/xed

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.