Merge pull request #1641 from Scrum/fix/italics-modifier
fix: Italics modifier (_) breaks links containing underscores
This commit is contained in:
commit
6c538a1abf
@ -169,7 +169,7 @@ const inline = {
|
||||
reflink: /^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,
|
||||
nolink: /^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,
|
||||
strong: /^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,
|
||||
em: /^_([^\s_])_(?!_)|^\*([^\s*<\[])\*(?!\*)|^_([^\s<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s<"][\s\S]*?[^\s\[\*])\*(?![\]`punctuation])|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,
|
||||
em: /^_([^\s_])_(?!_)|^_([^\s_<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s*<\[])\*(?!\*)|^\*([^\s<"][\s\S]*?[^\s\[\*])\*(?![\]`punctuation])|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,
|
||||
code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,
|
||||
br: /^( {2,}|\\)\n(?!\s*$)/,
|
||||
del: noopTest,
|
||||
|
@ -24,4 +24,6 @@
|
||||
|
||||
<p><em>1*</em></p>
|
||||
|
||||
<p>It’s levi<em>OH</em>sa, not levio<em>SAH.</em></p>
|
||||
<p>It’s levi<em>OH</em>sa, not levio<em>SAH.</em></p>
|
||||
|
||||
<p>__ test <a href="https://test.com/_">test</a></p>
|
@ -25,3 +25,5 @@ _1__
|
||||
*1**
|
||||
|
||||
It’s levi*OH*sa, not levio*SAH.*
|
||||
|
||||
__ test [test](https://test.com/_)
|
||||
|
Loading…
x
Reference in New Issue
Block a user