aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/syntaxSupport.h2
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/tests/test.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.h b/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.h
index 781ff65d..f834e275 100644
--- a/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.h
+++ b/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.h
@@ -101,7 +101,7 @@ protected:
if(splitactive>=0 || index<start){ continue; } //skip this one - falls within a multi-line pattern above
while(index>=0){
int len = patt.matchedLength();
- setFormat(index, len, rules[i].format);
+ if(format(index)==currentBlock().charFormat()){ setFormat(index, len, rules[i].format); } //only apply highlighting if not within a section already
index = patt.indexIn(text, index+len); //go to the next match
}
}//end loop over normal (single-line) patterns
diff --git a/src-qt5/desktop-utils/lumina-textedit/tests/test.cpp b/src-qt5/desktop-utils/lumina-textedit/tests/test.cpp
index 1b50e302..e135227d 100644
--- a/src-qt5/desktop-utils/lumina-textedit/tests/test.cpp
+++ b/src-qt5/desktop-utils/lumina-textedit/tests/test.cpp
@@ -13,3 +13,6 @@ comment */
stuff
some /*single line comment with multi-line tags */
+
+"some text"
+"some text with url: http://sample.com"
bgstack15