This commit is contained in:
@@ -395,7 +395,17 @@ export default {
|
|||||||
},
|
},
|
||||||
clickTask() {
|
clickTask() {
|
||||||
this.getSelectedRange();
|
this.getSelectedRange();
|
||||||
this.replaceSelectedText("`" + this.getSelectedText() + "`");
|
if (this.selection.hasSelection) {
|
||||||
|
let s = this.getSelectedBlock();
|
||||||
|
s = s.replace(/\n/gi, "\n* [ ] ");
|
||||||
|
if (s.length > 0 && s[0] != "\n") {
|
||||||
|
s = "* [ ] " + s;
|
||||||
|
}
|
||||||
|
s = s + "\n";
|
||||||
|
this.replaceSelectedBlock(s);
|
||||||
|
} else {
|
||||||
|
this.replaceSelectedText("\n* [ ] ");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user