From d29ff18299210b52a75a631a70963e7c8b35b04f Mon Sep 17 00:00:00 2001
From: Emanuil Rusev
Date: Thu, 6 Feb 2014 14:16:14 +0200
Subject: [PATCH] resolve #92
---
Parsedown.php | 2 +-
tests/data/code_span.html | 3 ++-
tests/data/code_span.md | 4 +++-
3 files changed, 6 insertions(+), 3 deletions(-)
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