diff --git a/src/rules.js b/src/rules.js index 85cccd5efd..268d0cf29a 100644 --- a/src/rules.js +++ b/src/rules.js @@ -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\*])\*(?!\*|[^\spunctuation])|^\*([^\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])\*(?!\*)/, code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, br: /^( {2,}|\\)\n(?!\s*$)/, del: noopTest, diff --git a/test/specs/new/em_2char.html b/test/specs/new/em_2char.html index 81da0a0001..56db779ccb 100644 --- a/test/specs/new/em_2char.html +++ b/test/specs/new/em_2char.html @@ -23,3 +23,5 @@

1_

1*

+ +

It’s leviOHsa, not levioSAH.

\ No newline at end of file diff --git a/test/specs/new/em_2char.md b/test/specs/new/em_2char.md index ca8689aaba..ef8e636657 100644 --- a/test/specs/new/em_2char.md +++ b/test/specs/new/em_2char.md @@ -23,3 +23,5 @@ _ 123_ _1__ *1** + +It’s levi*OH*sa, not levio*SAH.*