Skip to content

Commit

Permalink
Improve checkbox lists
Browse files Browse the repository at this point in the history
  • Loading branch information
pbek committed Oct 18, 2019
1 parent 756452b commit 7ffa456
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qmarkdowntextedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,7 @@ bool QMarkdownTextEdit::handleReturnEntered() {
// if return is pressed and there is just an unordered list symbol then we want to
// remove the list symbol
// Valid listCharacters: '+ ', '-' , '* ', '+ [ ] ', '+ [x] ', '- [ ] ', '- [x] ', '* [ ] ', '* [x] '.
QRegularExpression regex(R"(^(\s*)([+|\-|\*] \[(x| )\]|[+\-\*])(\s+)$)");
QRegularExpression regex(R"(^(\s*)([+|\-|\*] \[(x| |)\]|[+\-\*])(\s+)$)");
QRegularExpressionMatchIterator iterator = regex.globalMatch(currentLineText);
if (iterator.hasNext()) {
cursor.removeSelectedText();
Expand Down

0 comments on commit 7ffa456

Please sign in to comment.