aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop-utilities/lumina-textedit/syntaxSupport.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/desktop-utilities/lumina-textedit/syntaxSupport.cpp b/desktop-utilities/lumina-textedit/syntaxSupport.cpp
index 617cebae..7be190d2 100644
--- a/desktop-utilities/lumina-textedit/syntaxSupport.cpp
+++ b/desktop-utilities/lumina-textedit/syntaxSupport.cpp
@@ -71,7 +71,7 @@ void Custom_Syntax::loadRules(QString type){
//Quotes
rule.format.setForeground( QColor(settings->value("colors/text").toString()) );
rule.format.setFontWeight(QFont::Normal);
- rule.pattern = QRegExp("\".*\"");
+ rule.pattern = QRegExp( "\"[^\"\\\\]*(\\\\(.|\\n)[^\"\\\\]*)*\"|'[^'\\\\]*(\\\\(.|\\n)[^'\\\\]*)*'");
rules << rule;
//Functions
rule.format.setForeground( QColor(settings->value("colors/function").toString()) );
@@ -114,7 +114,7 @@ void Custom_Syntax::loadRules(QString type){
//Quotes
rule.format.setForeground( QColor(settings->value("colors/text").toString()) );
rule.format.setFontWeight(QFont::Normal);
- rule.pattern = QRegExp("\".*\"");
+ rule.pattern = QRegExp( "\"[^\"\\\\]*(\\\\(.|\\n)[^\"\\\\]*)*\"|'[^'\\\\]*(\\\\(.|\\n)[^'\\\\]*)*'");
rules << rule;
//Functions
rule.format.setForeground( QColor(settings->value("colors/function").toString()) );
@@ -173,7 +173,7 @@ void Custom_Syntax::loadRules(QString type){
//Quotes
rule.format.setForeground( QColor(settings->value("colors/text").toString()) );
rule.format.setFontWeight(QFont::Normal);
- rule.pattern = QRegExp("\".*\"");
+ rule.pattern = QRegExp( "\"[^\"\\\\]*(\\\\(.|\\n)[^\"\\\\]*)*\"|'[^'\\\\]*(\\\\(.|\\n)[^'\\\\]*)*'");
rules << rule;
//Functions
rule.format.setForeground( QColor(settings->value("colors/function").toString()) );
bgstack15