Fix Pedantic
This commit is contained in:
parent
283ab9cf8a
commit
c38ee23f45
@ -229,7 +229,7 @@ inline.normal = merge({}, inline);
|
|||||||
|
|
||||||
inline.pedantic = merge({}, inline.normal, {
|
inline.pedantic = merge({}, inline.normal, {
|
||||||
strong: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,
|
strong: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,
|
||||||
em: /^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,
|
em: /^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,
|
||||||
link: edit(/^!?\[(label)\]\((.*?)\)/)
|
link: edit(/^!?\[(label)\]\((.*?)\)/)
|
||||||
.replace('label', inline._label)
|
.replace('label', inline._label)
|
||||||
.getRegex(),
|
.getRegex(),
|
||||||
|
@ -53,3 +53,5 @@ runSpecs('Original', './original', false, { gfm: false, pedantic: true });
|
|||||||
runSpecs('New', './new');
|
runSpecs('New', './new');
|
||||||
runSpecs('ReDOS', './redos');
|
runSpecs('ReDOS', './redos');
|
||||||
runSpecs('Security', './security', false, { silent: true }); // silent - do not show deprecation warning
|
runSpecs('Security', './security', false, { silent: true }); // silent - do not show deprecation warning
|
||||||
|
|
||||||
|
//runSpecs('Whats', './whats');
|
||||||
|
4
test/specs/what/em_left_square_bracket.html
Normal file
4
test/specs/what/em_left_square_bracket.html
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<p>[<em>[punctuation, asterisk, punctuation should work</em></p>
|
||||||
|
<p><em>[space, asterisk, punctuation should work</em></p>
|
||||||
|
<p>p<em>non-punctuation, asterisk, non-punctuation should work</em></p>
|
||||||
|
<p>p*[non-punctuation, asterisk, punctuation should NOT work*</p>
|
10
test/specs/what/em_left_square_bracket.md
Normal file
10
test/specs/what/em_left_square_bracket.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[*[punctuation, asterisk, punctuation should work*
|
||||||
|
|
||||||
|
|
||||||
|
*[space, asterisk, punctuation should work*
|
||||||
|
|
||||||
|
|
||||||
|
p*non-punctuation, asterisk, non-punctuation should work*
|
||||||
|
|
||||||
|
|
||||||
|
p*[non-punctuation, asterisk, punctuation should NOT work*
|
1
test/specs/what/em_left_square_bracket0.html
Normal file
1
test/specs/what/em_left_square_bracket0.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
<p><em>foo <em>bar</em></em></p>
|
1
test/specs/what/em_left_square_bracket0.md
Normal file
1
test/specs/what/em_left_square_bracket0.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
*foo *bar**
|
1
test/specs/what/em_left_square_bracket00.html
Normal file
1
test/specs/what/em_left_square_bracket00.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
<p><em>foo <strong>bar</strong> baz</em></p>
|
1
test/specs/what/em_left_square_bracket00.md
Normal file
1
test/specs/what/em_left_square_bracket00.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
*foo **bar** baz*
|
1
test/specs/what/em_left_square_bracket000.html
Normal file
1
test/specs/what/em_left_square_bracket000.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
<p>foo <em>_</em></p>
|
1
test/specs/what/em_left_square_bracket0000.html
Normal file
1
test/specs/what/em_left_square_bracket0000.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
<p><em>(<strong>foo</strong>)</em></p>
|
1
test/specs/what/em_left_square_bracket0000.md
Normal file
1
test/specs/what/em_left_square_bracket0000.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
*(**foo**)*
|
7
test/specs/whats/strong_and_em_together.html
Normal file
7
test/specs/whats/strong_and_em_together.html
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<p><strong><em>This is strong and em.</em></strong></p>
|
||||||
|
|
||||||
|
<p>So is <strong><em>this</em></strong> word.</p>
|
||||||
|
|
||||||
|
<p><strong><em>This is strong and em.</em></strong></p>
|
||||||
|
|
||||||
|
<p>So is <strong><em>this</em></strong> word.</p>
|
7
test/specs/whats/strong_and_em_together.md
Normal file
7
test/specs/whats/strong_and_em_together.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
***This is strong and em.***
|
||||||
|
|
||||||
|
So is ***this*** word.
|
||||||
|
|
||||||
|
___This is strong and em.___
|
||||||
|
|
||||||
|
So is ___this___ word.
|
Loading…
x
Reference in New Issue
Block a user