@@ -277,11 +277,6 @@ const _punctuationGfmStrongEm = /(?!~)[\p{P}\p{S}]/u;
277277const _punctuationOrSpaceGfmStrongEm = / (? ! ~ ) [ \s \p{ P} \p{ S} ] / u;
278278const _notPunctuationOrSpaceGfmStrongEm = / (?: [ ^ \s \p{ P} \p{ S} ] | ~ ) / u;
279279
280- // GFM allows * and _ inside strikethrough
281- const _punctuationGfmDel = / (? ! [ * _ ] ) [ \p{ P} \p{ S} ] / u;
282- const _punctuationOrSpaceGfmDel = / (? ! [ * _ ] ) [ \s \p{ P} \p{ S} ] / u;
283- const _notPunctuationOrSpaceGfmDel = / (?: [ ^ \s \p{ P} \p{ S} ] | [ * _ ] ) / u;
284-
285280// sequences em should skip over [title](link), `code`, <html>
286281const blockSkip = edit ( / l i n k | p r e c o d e - c o d e | h t m l / , 'g' )
287282 . replace ( 'link' , / \[ (?: [ ^ \[ \] ` ] | (?< a > ` + ) [ ^ ` ] + \k<a > (? ! ` ) ) * ?\] \( (?: \\ [ \s \S ] | [ ^ \\ \( \) ] | \( (?: \\ [ \s \S ] | [ ^ \\ \( \) ] ) * \) ) * \) / )
@@ -338,7 +333,7 @@ const emStrongRDelimUnd = edit(
338333
339334// Tilde left delimiter for strikethrough (similar to emStrongLDelim for asterisk)
340335const delLDelim = edit ( / ^ ~ ~ ? (?: ( (? ! ~ ) p u n c t ) | [ ^ \s ~ ] ) / , 'u' )
341- . replace ( / p u n c t / g, _punctuationGfmDel )
336+ . replace ( / p u n c t / g, _punctuation )
342337 . getRegex ( ) ;
343338
344339// Tilde delimiter patterns for strikethrough (similar to asterisk)
@@ -352,9 +347,9 @@ const delRDelimCore =
352347+ '|notPunctSpace(~~?)(?=notPunctSpace)' ; // (6) a~~a can be either Left or Right Delimiter
353348
354349const delRDelim = edit ( delRDelimCore , 'gu' )
355- . replace ( / n o t P u n c t S p a c e / g, _notPunctuationOrSpaceGfmDel )
356- . replace ( / p u n c t S p a c e / g, _punctuationOrSpaceGfmDel )
357- . replace ( / p u n c t / g, _punctuationGfmDel )
350+ . replace ( / n o t P u n c t S p a c e / g, _notPunctuationOrSpace )
351+ . replace ( / p u n c t S p a c e / g, _punctuationOrSpace )
352+ . replace ( / p u n c t / g, _punctuation )
358353 . getRegex ( ) ;
359354
360355const anyPunctuation = edit ( / \\ ( p u n c t ) / , 'gu' )
0 commit comments