Better regexp for links

This commit is contained in:
Petr Mrázek 2014-07-09 01:17:59 +02:00
parent fc911add58
commit 7c51cc475b

View File

@ -43,7 +43,7 @@ QString reprocessMarkdown(QString markdown)
auto procLine = [&](QString line) -> QString
{
// [GitHub issues](https://github.com/MultiMC/MultiMC5/issues)
line.replace(QRegExp("\\[(.+)\\]\\((.+)\\)"), "<a href=\"\\2\">\\1</a>");
line.replace(QRegExp("\\[([^\\]]+)\\]\\(([^\\)]+)\\)"), "<a href=\"\\2\">\\1</a>");
return line;
};
for(auto line: lines)