mirror of
https://github.com/sparksuite/simplemde-markdown-editor.git
synced 2025-09-24 16:40:55 -06:00
Merge 74de7be32d06a0ac2866125f58d8b150797bef89 into 63d1621a203887f4deb588f6b371323de2b8b491
This commit is contained in:
commit
ea3c2e6d9c
@ -909,7 +909,7 @@ function _toggleLine(cm, name) {
|
||||
var map = {
|
||||
"quote": "> ",
|
||||
"unordered-list": "* ",
|
||||
"ordered-list": "1. "
|
||||
"ordered-list": "%i. "
|
||||
};
|
||||
for(var i = startPoint.line; i <= endPoint.line; i++) {
|
||||
(function(i) {
|
||||
@ -917,7 +917,7 @@ function _toggleLine(cm, name) {
|
||||
if(stat[name]) {
|
||||
text = text.replace(repl[name], "$1");
|
||||
} else {
|
||||
text = map[name] + text;
|
||||
text = map[name].replace(/\%i/g, (i - startPoint.line) + 1) + text;
|
||||
}
|
||||
cm.replaceRange(text, {
|
||||
line: i,
|
||||
|
Loading…
x
Reference in New Issue
Block a user