Skip to content

Commit

Permalink
Clarify comment explaining regex for hyperlink text
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris-Johnston committed Oct 3, 2019
1 parent d1fb773 commit 96ce328
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/Tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,8 @@ namespace Tools

QString getHyperlinkUrlText(const QString& notesInput)
{
// wrap strings that look like urls
// wrap strings that look like urls in the format
// protocol://path
return QString(notesInput).replace(QRegExp("(\\w+:\\/\\/\\S+)"), "<a href=\"\\1\">\\1</a>");
}

Expand Down

0 comments on commit 96ce328

Please sign in to comment.