We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 584f1c5 + a9c88ce commit a49e603Copy full SHA for a49e603
1 file changed
public/js/extra.js
@@ -713,11 +713,11 @@ $.fn.sortByDepth = function () {
713
function toggleTodoEvent (e) {
714
const startline = $(this).closest('li').attr('data-startline') - 1
715
const line = window.editor.getLine(startline)
716
- const matches = line.match(/^[>\s]*[-+*]\s\[([x ])\]/)
+ const matches = line.match(/^[>\s-]*[-+*]\s\[([x ])\]/)
717
if (matches && matches.length >= 2) {
718
let checked = null
719
if (matches[1] === 'x') { checked = true } else if (matches[1] === ' ') { checked = false }
720
- const replacements = matches[0].match(/(^[>\s]*[-+*]\s\[)([x ])(\])/)
+ const replacements = matches[0].match(/(^[>\s-]*[-+*]\s\[)([x ])(\])/)
721
window.editor.replaceRange(checked ? ' ' : 'x', {
722
line: startline,
723
ch: replacements[1].length
0 commit comments