sublimehq/sublime_text

This file gets stuck in the loading progress bar

Opened this issue · 1 comments

Description of the bug

For some reason the file attached gets stuck in the loading progress bar and never finishes opening, both in Sublime Text and seems to happen the same with Sublime Merge (which was unfortunate because this was the result of a merge conflict, so I couldn't use any of the two to fix it)

Steps to reproduce

Open this file with Sublime Text or Sublime Merge

core.zip

Expected behavior

Actual behavior

Sublime Text build number

4183

Operating system & version

Windows 10

(Linux) Desktop environment and/or window manager

No response

Additional information

No response

OpenGL context information

No response

The trigger are git conflict markers on lines 495 and 539f, which are interpreted as beginning of JSX tags but fail due to invald tag names. This seems to wind up syntax engine due to heavy branching being involved.

A solution would be to highlihgt multiple <<<< or >>>> illegal or just match JSX tags in a more strict manner.

Currently the following are matched as valid JSX tags as they are syntactically correct.

<
  tag name
>

<
  /
  tag_name
>

Restricting them to enforce tag name immediatelly following the < would also avoid running into infinite loops.