Skip to content

Commit 45a0277

Browse files
committed
Fixes the number list to increment correctly in the markdown view
1 parent 0bb0eb5 commit 45a0277

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

js/bootstrap-markdown.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1254,13 +1254,15 @@
12541254
// Set the cursor
12551255
cursor = selected.start + 3;
12561256
} else {
1257+
var i = 1;
12571258
var list = [];
12581259

12591260
list = selected.text.split('\n');
12601261
chunk = list[0];
12611262

12621263
$.each(list, function(k, v) {
1263-
list[k] = '1. ' + v;
1264+
list[k] = i + '. ' + v;
1265+
i++;
12641266
});
12651267

12661268
e.replaceSelection('\n\n' + list.join('\n'));

0 commit comments

Comments
 (0)