fixed escaping in mdhighlighter regex

This commit is contained in:
mrexodia 2017-03-30 04:32:51 +02:00
parent 0fa6165ab7
commit 1b45cbd8ea
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8

View File

@ -11,7 +11,7 @@ MdHighlighter::MdHighlighter(QTextDocument *parent)
keywordFormat.setFontWeight(QFont::Bold); keywordFormat.setFontWeight(QFont::Bold);
QStringList keywordPatterns; QStringList keywordPatterns;
keywordPatterns << "^\#{1,6}[ A-Za-z]+\\b" << "\\*\\*([^\\\\]+)\\*\\*" keywordPatterns << "^\\#{1,6}[ A-Za-z]+\\b" << "\\*\\*([^\\\\]+)\\*\\*"
<< "\\*([^\\\\]+)\\*" << "\\_([^\\\\]+)\\_" << "\\*([^\\\\]+)\\*" << "\\_([^\\\\]+)\\_"
<< "\\_\\_([^\\\\]+)\\_\\_"; << "\\_\\_([^\\\\]+)\\_\\_";