Skip to content

Commit

Permalink
bugfix: do not use reference to hold return value from capturedTexts()
Browse files Browse the repository at this point in the history
Signed-off-by: Le Tan <[email protected]>
  • Loading branch information
tamlok committed Jan 25, 2017
1 parent 010f424 commit 8db54c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hgmarkdownhighlighter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ void HGMarkdownHighlighter::highlightLinkWithSpacesInURL(const QString &p_text)
while (index >= 0) {
Q_ASSERT(regExp.captureCount() == 1);
int length = regExp.matchedLength();
const QString &capturedText = regExp.capturedTexts()[1];
QString capturedText = regExp.capturedTexts()[1];
if (capturedText.contains(' ')) {
if (p_text[index] == '!' && m_imageFormat.isValid()) {
setFormat(index, length, m_imageFormat);
Expand Down

0 comments on commit 8db54c4

Please sign in to comment.