Skip to content

Commit 3e6e13d

Browse files
committed
fix cursor position tracking for lists
See-also: bevacqua/woofmark#76 Signed-off-by: Kai Krakow <[email protected]>
1 parent 7eb5f04 commit 3e6e13d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

markdown.js

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ md.core.ruler.after('linkify', 'pos_counter', function posCounter (state) {
3434
if (token.type === 'hardbreak') {
3535
moveCursor(' \n');
3636
}
37+
if (token.type === 'list_item_open') {
38+
moveCursorAfterMatch(/^\s*\d+\. /g);
39+
}
3740
if (token.type === 'link_open') {
3841
moveCursor('[');
3942
}

0 commit comments

Comments
 (0)