File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6262 after = after . replace ( '[x]' , '[ ]' ) ; // make todo list default unchecked
6363 replacements [ i ] = "\n" + indent + bullet + after ;
6464
65- if ( numbered ) incrementRemainingMarkdownListNumbers ( cm , pos , disableAutoIncrement ) ;
65+ if ( numbered && ! disableAutoIncrement ) incrementRemainingMarkdownListNumbers ( cm , pos ) ;
6666 }
6767 }
6868
7171
7272 // Auto-updating Markdown list numbers when a new item is added to the
7373 // middle of a list
74- function incrementRemainingMarkdownListNumbers ( cm , pos , disableAutoIncrement ) {
74+ function incrementRemainingMarkdownListNumbers ( cm , pos ) {
7575 var startLine = pos . line , lookAhead = 0 , skipCount = 0 ;
7676 var startItem = listRE . exec ( cm . getLine ( startLine ) ) , startIndent = startItem [ 1 ] ;
7777
8888 if ( startIndent === nextIndent && ! isNaN ( nextNumber ) ) {
8989 if ( newNumber === nextNumber ) itemNumber = nextNumber + 1 ;
9090 if ( newNumber > nextNumber ) itemNumber = newNumber + 1 ;
91- if ( disableAutoIncrement ) itemNumber = 1
92-
9391 cm . replaceRange (
9492 nextLine . replace ( listRE , nextIndent + itemNumber + nextItem [ 4 ] + nextItem [ 5 ] ) ,
9593 {
You can’t perform that action at this time.
0 commit comments