mirror of
https://github.com/sparksuite/simplemde-markdown-editor.git
synced 2025-09-24 16:40:55 -06:00
Fixed ordered list markers. #212
This commit is contained in:
parent
5081e100a6
commit
74de7be32d
@ -907,7 +907,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) {
|
||||
@ -915,7 +915,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