diff --git a/Parsedown.php b/Parsedown.php index 3f74776..ebc8097 100755 --- a/Parsedown.php +++ b/Parsedown.php @@ -1028,7 +1028,7 @@ class Parsedown case '`': - if (preg_match('/^(`+)[ ]*(.+?)[ ]*\1(?!`)/', $text, $matches)) + if (preg_match('/^(`+)[ ]*(.+?)[ ]*(?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`

\ No newline at end of file +

backtick-delimited string in a code span: `foo`

+

sth `` sth

\ No newline at end of file diff --git a/tests/data/code_span.md b/tests/data/code_span.md index 0654262..c2f1a74 100644 --- a/tests/data/code_span.md +++ b/tests/data/code_span.md @@ -6,4 +6,6 @@ a `code span` single backtick in a code span: `` ` `` -backtick-delimited string in a code span: `` `foo` `` \ No newline at end of file +backtick-delimited string in a code span: `` `foo` `` + +`sth `` sth` \ No newline at end of file