From d65ec2a849ea71b01a9d7655861f3677f8e5c927 Mon Sep 17 00:00:00 2001 From: Ivan Demidov Date: Mon, 13 Apr 2020 12:02:51 +0300 Subject: [PATCH 1/2] test: for issue #1248 --- test/specs/new/em_2char.html | 4 +++- test/specs/new/em_2char.md | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/test/specs/new/em_2char.html b/test/specs/new/em_2char.html index 56db779c..eb490362 100644 --- a/test/specs/new/em_2char.html +++ b/test/specs/new/em_2char.html @@ -24,4 +24,6 @@

1*

-

It’s leviOHsa, not levioSAH.

\ No newline at end of file +

It’s leviOHsa, not levioSAH.

+ +

__ test test

\ No newline at end of file diff --git a/test/specs/new/em_2char.md b/test/specs/new/em_2char.md index ef8e6366..da347391 100644 --- a/test/specs/new/em_2char.md +++ b/test/specs/new/em_2char.md @@ -25,3 +25,5 @@ _1__ *1** It’s levi*OH*sa, not levio*SAH.* + +__ test [test](https://test.com/_) From af9ff6772fbe5e488129e228c88eb09629eec591 Mon Sep 17 00:00:00 2001 From: Ivan Demidov Date: Mon, 13 Apr 2020 12:03:57 +0300 Subject: [PATCH 2/2] fix: italics-modifier, close issue #1284 --- src/rules.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rules.js b/src/rules.js index 268d0cf2..8877852d 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\[\*])\*(?![\]`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,