Should fix a tokenizer bug.

Fixes in markdown grammar.
This commit is contained in:
Martín Lucas Golini
2025-12-14 01:55:47 -03:00
parent 4857c85e66
commit 6ea10b5342
2 changed files with 9 additions and 9 deletions

View File

@@ -78,10 +78,10 @@ void addMarkdown() {
{ "inside_bold",
{
{ { "include" }, "#strings", "normal" },
{ { "include" }, "#decorations_italic", "normal" },
{ { "include" }, "#decorations_strikethrough", "normal" },
{ { "include" }, "#links", "normal" },
{ { "include", "#strings" }, "normal" },
{ { "include", "#decorations_italic" }, "normal" },
{ { "include", "#decorations_strikethrough" }, "normal" },
{ { "include", "#links" }, "normal" },
} },
{ "decorations_bold",
@@ -107,10 +107,10 @@ void addMarkdown() {
{ "inside_italic",
{
{ { "include" }, "#strings", "normal" },
{ { "include" }, "#decorations_bold", "normal" },
{ { "include" }, "#decorations_strikethrough", "normal" },
{ { "include" }, "#links", "normal" },
{ { "include", "#strings" }, "normal" },
{ { "include", "#decorations_bold" }, "normal" },
{ { "include", "#decorations_strikethrough" }, "normal" },
{ { "include", "#links" }, "normal" },
} },
{ "decorations_italic",

View File

@@ -248,7 +248,7 @@ static inline void popStack( SyntaxStateRestored& curState, SyntaxState& retStat
return;
}
if ( curState.currentLevel > 0 )
if ( curState.currentLevel > 0 && fromPattern.hasSyntax() )
curState.currentLevel--;
if ( retState.langStack[curState.currentLevel] != 0 &&