@@ -430,22 +430,22 @@ Lexer.prototype.token = function (src, top) {
430
430
*/
431
431
432
432
const inline = {
433
- escape : / ^ \\ ( [ \\ ` * { } \ [\] ( ) # + \- . ! _ > ] ) / ,
433
+ escape : / ^ \\ ( [ \\ ` * { } [ \] ( ) # + \- . ! _ > ] ) / ,
434
434
autolink : / ^ < ( [ ^ > ] + ( @ | : \/ ) [ ^ > ] + ) > / ,
435
435
url : noop ,
436
436
tag : / ^ < ! - - [ \s \S ] * ?- - > | ^ < \/ ? \w + (?: " [ ^ " ] * " | ' [ ^ ' ] * ' | [ ^ ' " > ] ) * ?> / ,
437
437
link : / ^ ! ? \[ ( i n s i d e ) \] \( h r e f \) / ,
438
438
reflink : / ^ ! ? \[ ( i n s i d e ) \] \s * \[ ( [ ^ \] ] * ) \] / ,
439
- nolink : / ^ ! ? \[ ( (?: \[ [ ^ \] ] * \] | [ ^ \ [\] ] ) * ) \] / ,
439
+ nolink : / ^ ! ? \[ ( (?: \[ [ ^ \] ] * \] | [ ^ [ \] ] ) * ) \] / ,
440
440
strong : / ^ _ _ ( [ \s \S ] + ?) _ _ (? ! _ ) | ^ \* \* ( [ \s \S ] + ?) \* \* (? ! \* ) / ,
441
441
em : / ^ \b _ ( (?: _ _ | [ \s \S ] ) + ?) _ \b | ^ \* ( (?: \* \* | [ \s \S ] ) + ?) \* (? ! \* ) / ,
442
442
code : / ^ ( ` + ) \s * ( [ \s \S ] * ?[ ^ ` ] ) \s * \1(? ! ` ) / ,
443
443
br : / ^ { 2 , } \n (? ! \s * $ ) / ,
444
444
del : noop ,
445
- text : / ^ [ \s \S ] + ?(? = [ \\ < ! \ [_ * ` ] | { 2 , } \n | $ ) / ,
445
+ text : / ^ [ \s \S ] + ?(? = [ \\ < ! [ _ * ` ] | { 2 , } \n | $ ) / ,
446
446
}
447
447
448
- inline . _inside = / (?: \[ [ ^ \] ] * \] | [ ^ \] ] | \] (? = [ ^ \ [] * \] ) ) * /
448
+ inline . _inside = / (?: \[ [ ^ \] ] * \] | [ ^ \] ] | \] (? = [ ^ [ ] * \] ) ) * /
449
449
inline . _href = / \s * < ? ( [ ^ \s ] * ?) > ? (?: \s + [ ' " ] ( [ \s \S ] * ?) [ ' " ] ) ? \s * /
450
450
451
451
inline . link = replace ( inline . link ) ( "inside" , inline . _inside ) (
@@ -602,7 +602,7 @@ InlineLexer.prototype.output = function (src) {
602
602
link = ( cap [ 2 ] || cap [ 1 ] ) . replace ( / \s + / g, " " )
603
603
link = this . links [ link . toLowerCase ( ) ]
604
604
if ( ! link || ! link . href ) {
605
- out . push . apply ( out , this . output ( cap [ 0 ] [ 0 ] ) )
605
+ out . push ( ... this . output ( cap [ 0 ] [ 0 ] ) )
606
606
src = cap [ 0 ] . substring ( 1 ) + src
607
607
continue
608
608
}
@@ -849,7 +849,7 @@ function replace(regex, opt) {
849
849
return function self ( name , val ) {
850
850
if ( ! name ) return new RegExp ( regex , opt )
851
851
val = val . source || val
852
- val = val . replace ( / ( ^ | [ ^ \ [] ) \^ / g, "$1" )
852
+ val = val . replace ( / ( ^ | [ ^ [ ] ) \^ / g, "$1" )
853
853
regex = regex . replace ( name , val )
854
854
return self
855
855
}
0 commit comments