You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But when I start adding a headline in between, it converts first :END: and last :END into a drawer, and treats everything in between as a drawer content:
Once I add the space after the * it parses it correctly.
This is more-less expected, but for that 1 change a lot of nodes are updated. In the reported issue this happens between two headlines where it ends up putting ~500 lines into the drawer content for a split second and freezes the editor.
I can think of a few solutions here, but I was able to test only one myself:
Never allow :END: to be a start of a drawer
Consider asterisk(s) at the start of a line a valid node (expr) even if it does not have a space after it
Hey,
I've got an issue where user reported freezing. It is caused by my manual markup highlighter, but the problem is also a big file.
I tried to narrow down what's the issue, and I noticed one thing.
Having this file:
Parses it correctly:
But when I start adding a headline in between, it converts first
:END:
and last:END
into a drawer, and treats everything in between as a drawer content:Updated file:
Parsed as:
Once I add the space after the
*
it parses it correctly.This is more-less expected, but for that 1 change a lot of nodes are updated. In the reported issue this happens between two headlines where it ends up putting ~500 lines into the drawer content for a split second and freezes the editor.
I can think of a few solutions here, but I was able to test only one myself:
:END:
to be a start of a drawerFor the 2. point, what I mean is this:
Content:
Parsed:
When something is added to that line that's not a space:
This change in the parser does the trick for me:
I think the 2nd option is simpler and probably more correct. Unless there is a space after
*
, there's no need to treat it as headline.Let me know what you think.
The text was updated successfully, but these errors were encountered: