Skip to content
Closed
2 changes: 1 addition & 1 deletion src/rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ const _punctuationOrSpaceGfmStrongEm = /(?!~)[\s\p{P}\p{S}]/u;
const _notPunctuationOrSpaceGfmStrongEm = /(?:[^\s\p{P}\p{S}]|~)/u;

// sequences em should skip over [title](link), `code`, <html>
const blockSkip = /\[(?:[^\[\]`]|`[^`]*?`)*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g;
const blockSkip = /\[(?:[^\[\]`]|`(?:[^`\\]|\\.)*`)*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g;

const emStrongLDelimCore = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/;

Expand Down
1 change: 1 addition & 0 deletions test/specs/new/bold_codespan_autolink.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p><strong>Really weird edge case: bold around what looks like it might be a link, but is actually a link-looking thing with a code specifier in. [Like <code>this](https://github.com)</code>. It&#39;s now impossible to close the bold</strong>.</p>
1 change: 1 addition & 0 deletions test/specs/new/bold_codespan_autolink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**Really weird edge case: bold around what looks like it might be a link, but is actually a link-looking thing with a code specifier in. [Like `this](https://github.com)`. It's now impossible to close the bold**.