mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
resolve #89
This commit is contained in:
parent
7a4d3c0f18
commit
548a6f7945
@ -974,7 +974,7 @@ class Parsedown
|
||||
|
||||
case '`':
|
||||
|
||||
if (preg_match('/^(`+)(.+?)\1(?!`)/', $text, $matches))
|
||||
if (preg_match('/^(`+)[ ]*(.+?)[ ]*\1(?!`)/', $text, $matches))
|
||||
{
|
||||
$element_text = $matches[2];
|
||||
$element_text = htmlspecialchars($element_text, ENT_NOQUOTES, 'UTF-8');
|
||||
|
@ -1,3 +1,5 @@
|
||||
<p>a <code>code span</code></p>
|
||||
<p><code>this is also a codespan</code> trailing text</p>
|
||||
<p><code>and look at this one!</code></p>
|
||||
<p>single backtick in a code span: <code>`</code></p>
|
||||
<p>backtick-delimited string in a code span: <code>`foo`</code></p>
|
@ -3,3 +3,7 @@ a `code span`
|
||||
`this is also a codespan` trailing text
|
||||
|
||||
`and look at this one!`
|
||||
|
||||
single backtick in a code span: `` ` ``
|
||||
|
||||
backtick-delimited string in a code span: `` `foo` ``
|
Loading…
Reference in New Issue
Block a user