Skip to content

Commit

Permalink
Merge pull request #1600 from Waqar144/rewrite-em
Browse files Browse the repository at this point in the history
Fix crash
  • Loading branch information
pbek committed Jan 21, 2020
2 parents bd38e99 + 16acca6 commit ec2c6c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/helpers/qownnotesmarkdownhighlighter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ void QOwnNotesMarkdownHighlighter::highlightMarkdown(const QString& text) {
text.startsWith(QLatin1String("```")) ||
text.startsWith(QLatin1String("~~~"));
const QString &next = currentBlock().next().text();
const bool isHeading = text.at(0) == QChar('#');
const bool isHeading = !text.isEmpty() && text.at(0) == QChar('#');
const bool isSetextHeading = (next.startsWith(QLatin1String("===")) ||
next.startsWith(QLatin1String("---"))) &&
!text.isEmpty();
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/qmarkdowntextedit

0 comments on commit ec2c6c0

Please sign in to comment.