mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
resolve #248
This commit is contained in:
parent
9816507a75
commit
5bc6d90f8b
@ -1410,13 +1410,13 @@ class Parsedown
|
||||
);
|
||||
|
||||
protected $StrongRegex = array(
|
||||
'*' => '/^[*]{2}((?:[^*]|[*][^*]*[*])+?)[*]{2}(?![*])/s',
|
||||
'_' => '/^__((?:[^_]|_[^_]*_)+?)__(?!_)/us',
|
||||
'*' => '/^[*]{2}((?:\\\\\*|[^*]|[*][^*]*[*])+?)[*]{2}(?![*])/s',
|
||||
'_' => '/^__((?:\\\\_|[^_]|_[^_]*_)+?)__(?!_)/us',
|
||||
);
|
||||
|
||||
protected $EmRegex = array(
|
||||
'*' => '/^[*]((?:[^*]|[*][*][^*]+?[*][*])+?)[*](?![*])/s',
|
||||
'_' => '/^_((?:[^_]|__[^_]*__)+?)_(?!_)\b/us',
|
||||
'*' => '/^[*]((?:\\\\\*|[^*]|[*][*][^*]+?[*][*])+?)[*](?![*])/s',
|
||||
'_' => '/^_((?:\\\\_|[^_]|__[^_]*__)+?)_(?!_)\b/us',
|
||||
);
|
||||
|
||||
protected $voidElements = array(
|
||||
|
@ -1,4 +1,6 @@
|
||||
<p>escaped *emphasis*.</p>
|
||||
<p><code>escaped \*emphasis\* in a code span</code></p>
|
||||
<pre><code>escaped \*emphasis\* in a code block</code></pre>
|
||||
<p>\ ` * _ { } [ ] ( ) > # + - . !</p>
|
||||
<p>\ ` * _ { } [ ] ( ) > # + - . !</p>
|
||||
<p><em>one_two</em> <strong>one_two</strong></p>
|
||||
<p><em>one*two</em> <strong>one*two</strong></p>
|
@ -4,4 +4,8 @@ escaped \*emphasis\*.
|
||||
|
||||
escaped \*emphasis\* in a code block
|
||||
|
||||
\\ \` \* \_ \{ \} \[ \] \( \) \> \# \+ \- \. \!
|
||||
\\ \` \* \_ \{ \} \[ \] \( \) \> \# \+ \- \. \!
|
||||
|
||||
_one\_two_ __one\_two__
|
||||
|
||||
*one\*two* **one\*two**
|
Loading…
Reference in New Issue
Block a user