From 2c3c252c8c4c927fe78cf9050028eaaf679d71aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Thu, 16 Oct 2025 23:57:27 -0300 Subject: [PATCH] Fix in highlighting for some rare lua patterns. --- src/eepp/ui/doc/syntaxtokenizer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/eepp/ui/doc/syntaxtokenizer.cpp b/src/eepp/ui/doc/syntaxtokenizer.cpp index 49e8cc44b..7b9ff4708 100644 --- a/src/eepp/ui/doc/syntaxtokenizer.cpp +++ b/src/eepp/ui/doc/syntaxtokenizer.cpp @@ -397,7 +397,10 @@ _tokenize( const SyntaxDefinition& syntax, const std::string& text, const Syntax int fullMatchEnd = matches[0].end; if ( pattern.matchType == SyntaxPatternMatchType::RegEx || - pattern.matchType == SyntaxPatternMatchType::Parser ) { + pattern.matchType == SyntaxPatternMatchType::Parser || + std::find_if( matches.begin(), matches.end(), []( auto match ) { + return match.start == match.end; + } ) != matches.end() ) { priorityMap.clear(); priorityMap.resize( fullMatchEnd - fullMatchStart, 0 );