Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[markdown] Sublime text 4 hangs in some cases #3494

Closed
pdanford opened this issue Sep 29, 2022 · 3 comments · Fixed by #3495
Closed

[markdown] Sublime text 4 hangs in some cases #3494

pdanford opened this issue Sep 29, 2022 · 3 comments · Fixed by #3495
Labels
T: bug A bug in an existing language feature

Comments

@pdanford
Copy link

pdanford commented Sep 29, 2022

What happened?

  • Sublime Text 4 (Dev Channel, Build 4137)
  • macOS 12.6 (Intel)

Sublime Text 4 complety hangs and must be kill -9'd to exit. To reproduce, create a file hang.md with the following:

- [] note

test  
===========================================

---> Note there are 2 spaces after "test".

  1. open hang.md in Sublime Text
  2. ensure markdown syntax highlighting is selected
  3. try to add another = to the end of the ==== line
  4. Sublime Text 4 hangs
@pdanford pdanford added the T: bug A bug in an existing language feature label Sep 29, 2022
@deathaxe
Copy link
Collaborator

Appears to be a result of sublimehq/sublime_text#5415

It's triggered by 2 branch patterns (setext-or-paragraph vs. math-blocks) being stacked onto each other.

Commenting out the following line fixes the issue, but disables mathml blocks.

- include: math-blocks

deathaxe added a commit to deathaxe/sublime-packages that referenced this issue Sep 30, 2022
Fixes sublimehq#3494

The hard-line-breaks context causes deadlock in setext-or-paragraph
context maybe caused by in-accurate rewinding or back-and-forth of
branches while typing.

Same issue was found while working on Markdonw's MathML support.

This commit implements the same workaround by just consuming some
tokens in 2nd and 3rd branch to avoid ST from trying the 1st one again.
@deathaxe
Copy link
Collaborator

It's actually the mensioned core issue, but the trigger are the hard line break patterns, instead of the math block.

deathaxe added a commit to SublimeText-Markdown/MarkdownEditing that referenced this issue Sep 30, 2022
@pdanford
Copy link
Author

pdanford commented Oct 1, 2022

Thanks for finding that so quickly :)

deathaxe added a commit that referenced this issue Oct 1, 2022
Fixes #3494

The hard-line-breaks context causes deadlock in setext-or-paragraph
context maybe caused by in-accurate rewinding or back-and-forth of
branches while typing.

Same issue was found while working on Markdonw's MathML support.

This commit implements the same workaround by just consuming some
tokens in 2nd and 3rd branch to avoid ST from trying the 1st one again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: bug A bug in an existing language feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants