Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
crackedmind committed Mar 6, 2021
1 parent 4a7f06c commit a1fe32c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions vcreatorhighlighter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,11 @@ void VlangHighlighter::highlightBlock(const QString &text)
QRegularExpression re(R"del((\$([\w.]+|\{.*?\})))del");
QString t = text.mid(token.offset, token.length);
auto it = re.globalMatch(t);
int matches = 0;

setFormat(token.offset, token.length, formatForCategory(TextEditor::C_STRING));
while(it.hasNext()) {
auto match = it.next();
setFormat(token.offset + match.capturedStart(1), match.capturedEnd(1) - match.capturedStart(1), formatForCategory(TextEditor::C_TYPE));
matches++;
}
}
break;
Expand Down

0 comments on commit a1fe32c

Please sign in to comment.