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 &&