mirror of
https://github.com/markedjs/marked.git
synced 2026-11-30 16:48:05 +01:00
Co-authored-by: Tony Brix <tony@brix.ninja>
This commit is contained in:
co-authored by
Tony Brix
parent
28528ff259
commit
1da8fb5da9
+3
-1
@@ -267,7 +267,9 @@ 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 = edit(/\[(?:[^\[\]`]|`[^`]*?`)*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|codePattern|<(?! )[^<>]*?>/, 'g')
|
||||
.replace('codePattern', /(?<!`)(`+)[^`]+\1(?!`)/)
|
||||
.getRegex();
|
||||
|
||||
const emStrongLDelimCore = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/;
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<p>**You might think this should be bold, but: <code>**</code></p>
|
||||
<p>**You might think this should be bold, but: <code>**</code></p>
|
||||
<p>**You might think this should be bold, but: <code>**</code></p>
|
||||
<p>**You might think this should be bold, but: <code>**</code></p>
|
||||
<p><strong>This should be bold</strong> and <code>this should be code</code></p>
|
||||
<p><strong>start <code>contains **</code> end</strong></p>
|
||||
<p><strong>This should be bold ``</strong>`</p>
|
||||
<p><strong>This should be bold `</strong>``</p>
|
||||
<p><strong>start <code>contains **</code> end</strong></p>
|
||||
@@ -0,0 +1,17 @@
|
||||
**You might think this should be bold, but: `**`
|
||||
|
||||
**You might think this should be bold, but: ``**``
|
||||
|
||||
**You might think this should be bold, but: ```**```
|
||||
|
||||
**You might think this should be bold, but: ````**````
|
||||
|
||||
**This should be bold** and `this should be code`
|
||||
|
||||
**start `contains **` end**
|
||||
|
||||
**This should be bold ``**`
|
||||
|
||||
**This should be bold `**``
|
||||
|
||||
**start ``contains **`` end**
|
||||
Reference in New Issue
Block a user