File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -541,13 +541,18 @@ var inline = {
541
541
reflink : / ^ ! ? \[ ( l a b e l ) \] \[ (? ! \s * \] ) ( (?: \\ [ \[ \] ] ? | [ ^ \[ \] \\ ] ) + ) \] / ,
542
542
nolink : / ^ ! ? \[ (? ! \s * \] ) ( (?: \[ [ ^ \[ \] ] * \] | \\ [ \[ \] ] | [ ^ \[ \] ] ) * ) \] (?: \[ \] ) ? / ,
543
543
strong : / ^ _ _ ( [ ^ \s ] ) _ _ (? ! _ ) | ^ \* \* ( [ ^ \s ] ) \* \* (? ! \* ) | ^ _ _ ( [ ^ \s ] [ \s \S ] * ?[ ^ \s ] ) _ _ (? ! _ ) | ^ \* \* ( [ ^ \s ] [ \s \S ] * ?[ ^ \s ] ) \* \* (? ! \* ) / ,
544
- em : / ^ _ ( [ ^ \s _ ] ) _ (? ! _ ) | ^ \* ( [ ^ \s * " < \[ ] ) \* (? ! \* ) | ^ _ ( [ ^ \s ] [ \s \S ] * ?[ ^ \s _ ] ) _ (? ! _ | [ ^ \s . ] ) | ^ _ ( [ ^ \s _ ] [ \s \S ] * ?[ ^ \s ] ) _ (? ! _ | [ ^ \s . ] ) | ^ \* ( [ ^ \s " < \[ ] [ \s \S ] * ?[ ^ \s * ] ) \* (? ! \* ) | ^ \* ( [ ^ \s * " < \[ ] [ \s \S ] * ?[ ^ \s ] ) \* (? ! \* ) / ,
544
+ em : / ^ _ ( [ ^ \s _ ] ) _ (? ! _ ) | ^ \* ( [ ^ \s * " < \[ ] ) \* (? ! \* ) | ^ _ ( [ ^ \s ] [ \s \S ] * ?[ ^ \s _ ] ) _ (? ! _ | [ ^ \s p u n c t u a t i o n ] ) | ^ _ ( [ ^ \s _ ] [ \s \S ] * ?[ ^ \s ] ) _ (? ! _ | [ ^ \s p u n c t u a t i o n ] ) | ^ \* ( [ ^ \s " < \[ ] [ \s \S ] * ?[ ^ \s * ] ) \* (? ! \* ) | ^ \* ( [ ^ \s * " < \[ ] [ \s \S ] * ?[ ^ \s ] ) \* (? ! \* ) / ,
545
545
code : / ^ ( ` + ) ( [ ^ ` ] | [ ^ ` ] [ \s \S ] * ?[ ^ ` ] ) \1(? ! ` ) / ,
546
546
br : / ^ ( { 2 , } | \\ ) \n (? ! \s * $ ) / ,
547
547
del : noop ,
548
548
text : / ^ ( ` + | [ ^ ` ] ) [ \s \S ] * ?(? = [ \\ < ! \[ ` * ] | \b _ | { 2 , } \n | $ ) /
549
549
} ;
550
550
551
+ // list of punctuation marks from common mark spec
552
+ // without ` and ] to workaround Rule 17 (inline code blocks/links)
553
+ inline . _punctuation = '!"#$%&\'()*+,\\-./:;<=>?@\\[^_{|}~' ;
554
+ inline . em = edit ( inline . em ) . replace ( / p u n c t u a t i o n / g, inline . _punctuation ) . getRegex ( ) ;
555
+
551
556
inline . _escapes = / \\ ( [ ! " # $ % & ' ( ) * + , \- . / : ; < = > ? @ \[ \] \\ ^ _ ` { | } ~ ] ) / g;
552
557
553
558
inline . _scheme = / [ a - z A - Z ] [ a - z A - Z 0 - 9 + . - ] { 1 , 31 } / ;
You can’t perform that action at this time.
0 commit comments