From 6ea10b5342c8a65f7b9849e80ef516b893b5747e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Sun, 14 Dec 2025 01:55:47 -0300 Subject: [PATCH] Should fix a tokenizer bug. Fixes in markdown grammar. --- src/eepp/ui/doc/languages/markdown.cpp | 16 ++++++++-------- src/eepp/ui/doc/syntaxtokenizer.cpp | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/eepp/ui/doc/languages/markdown.cpp b/src/eepp/ui/doc/languages/markdown.cpp index 5957ddb80..e158bb27e 100644 --- a/src/eepp/ui/doc/languages/markdown.cpp +++ b/src/eepp/ui/doc/languages/markdown.cpp @@ -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", diff --git a/src/eepp/ui/doc/syntaxtokenizer.cpp b/src/eepp/ui/doc/syntaxtokenizer.cpp index bcdeec246..e9980f7ab 100644 --- a/src/eepp/ui/doc/syntaxtokenizer.cpp +++ b/src/eepp/ui/doc/syntaxtokenizer.cpp @@ -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 &&