Skip to content

Commit

Permalink
Merge branch 'master' of github.com:orion-project/rezonator2
Browse files Browse the repository at this point in the history
  • Loading branch information
Chunosov committed Nov 27, 2021
2 parents fe0c8e7 + 6c7d913 commit a5321ce
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/MemoWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,15 @@ class MemoHighlighter : public QSyntaxHighlighter
protected:
const QVector<Rule>& rules() const
{
static QVector<Rule> rules = {
{
.expr = QRegularExpression("\\bhttp(s?)://[^\\s]+\\b"),
.format = MemoTextFormat("blue").underline().get(),
.hyperlink = true,
}
};
static QVector<Rule> rules;
if (rules.isEmpty())
{
Rule rule;
rule.expr = QRegularExpression("\\bhttp(s?)://[^\\s]+\\b");
rule.format = MemoTextFormat("blue").underline().get();
rule.hyperlink = true;
rules << rule;
}
return rules;
}

Expand Down

0 comments on commit a5321ce

Please sign in to comment.