@@ -225,7 +225,7 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
225225
226226 // Add this list item's content's indentation to the stack
227227 state . listStack . push ( state . indentation ) ;
228- // Reset inline styles which shouldn't propagate aross list items
228+ // Reset inline styles which shouldn't propagate across list items
229229 state . em = false ;
230230 state . strong = false ;
231231 state . code = false ;
@@ -654,7 +654,7 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
654654 return getType ( state ) ;
655655 }
656656 } else if ( ch === ' ' ) {
657- if ( stream . match ( / ^ ~ ~ / , true ) ) { // Probably surrounded by space
657+ if ( stream . match ( '~~' , true ) ) { // Probably surrounded by space
658658 if ( stream . peek ( ) === ' ' ) { // Surrounded by spaces, ignore
659659 return getType ( state ) ;
660660 } else { // Not surrounded by spaces, back up pointer
@@ -753,7 +753,7 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
753753 }
754754
755755 function footnoteLinkInside ( stream , state ) {
756- if ( stream . match ( / ^ \] : / , true ) ) {
756+ if ( stream . match ( ']:' , true ) ) {
757757 state . f = state . inline = footnoteUrl ;
758758 if ( modeCfg . highlightFormatting ) state . formatting = "link" ;
759759 var returnType = getType ( state ) ;
@@ -777,7 +777,7 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
777777 if ( stream . peek ( ) === undefined ) { // End of line, set flag to check next line
778778 state . linkTitle = true ;
779779 } else { // More content on line, check if link title
780- stream . match ( / ^ (?: \s + (?: " (?: [ ^ " \\ ] | \\ \\ | \\ .) + " | ' (?: [ ^ ' \\ ] | \\ \\ | \\ .) + ' | \( (?: [ ^ ) \\ ] | \\ \\ | \\ .) + \) ) ) ? / , true ) ;
780+ stream . match ( / ^ (?: \s + (?: " (?: [ ^ " \\ ] | \\ .) + " | ' (?: [ ^ ' \\ ] | \\ .) + ' | \( (?: [ ^ ) \\ ] | \\ .) + \) ) ) ? / , true ) ;
781781 }
782782 state . f = state . inline = inlineNormal ;
783783 return tokenTypes . linkHref + " url" ;
0 commit comments