diff options
author | Ken Moore <ken@pcbsd.org> | 2016-09-12 09:36:32 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2016-09-12 09:36:32 -0400 |
commit | 352fd897df1bd3130a0941a1937049b0aea36ae2 (patch) | |
tree | f4b02dc61fb7314ca0ecba21a2db3e5596d4cd60 /src-qt5 | |
parent | Clean up the find/replace dialog a bit: (diff) | |
download | lumina-352fd897df1bd3130a0941a1937049b0aea36ae2.tar.gz lumina-352fd897df1bd3130a0941a1937049b0aea36ae2.tar.bz2 lumina-352fd897df1bd3130a0941a1937049b0aea36ae2.zip |
Cleanup a couple syntax highlighting rules for .rst files.
Diffstat (limited to 'src-qt5')
-rw-r--r-- | src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp b/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp index c13385d7..ed3a3eac 100644 --- a/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp +++ b/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp @@ -145,12 +145,12 @@ void Custom_Syntax::loadRules(QString type){ // directives rule.format.setForeground( QColor(settings->value("colors/class").toString()) ); rule.format.setFontItalic(false); - rule.pattern = QRegExp("(\\s|^):[a-zA-Z0-9 ]*:`[^`]*`(?=(\\s|$))"); + rule.pattern = QRegExp("(\\s|^):[a-zA-Z0-9 ]*:`[^`]*`"); rules << rule; // hyperlinks rule.format.setFontItalic(true); rule.format.setFontWeight(QFont::Normal); - rule.pattern = QRegExp("`[^\\<]*\\<[^\\>]*\\>`_(\\s|$)"); + rule.pattern = QRegExp("`[^\\<]*\\<[^\\>]*\\>`_"); rules << rule; // Code Sample rule.format.setFontItalic(false); @@ -159,10 +159,10 @@ void Custom_Syntax::loadRules(QString type){ rule.pattern = QRegExp("\\b`{2}.*`{2}\\b"); rules << rule; //Quotes - rule.format.setForeground( QColor(settings->value("colors/text").toString()) ); + /*rule.format.setForeground( QColor(settings->value("colors/text").toString()) ); rule.format.setFontWeight(QFont::Normal); rule.pattern = QRegExp( "\"[^\"\\\\]*(\\\\(.|\\n)[^\"\\\\]*)*\"|'[^'\\\\]*(\\\\(.|\\n)[^'\\\\]*)*'"); - rules << rule; + rules << rule;*/ //TODO rule = SyntaxRule(); //reset rule rule.format.setFontWeight( QFont::Bold ); @@ -170,7 +170,7 @@ void Custom_Syntax::loadRules(QString type){ rules << rule; rule = SyntaxRule(); //reset rule rule.format.setFontWeight( QFont::Bold ); - rule.pattern = QRegExp("^\\.\\.\\s(note|warning|important)::\\s"); + rule.pattern = QRegExp("^(\\s*)\\.\\.(\\s*)([a-zA-Z0-9]+)::\\s"); rules << rule; //Functions rule = SyntaxRule(); //reset rule |