From 383916493d8d05feb8df72e61cbec15d9b5fb937 Mon Sep 17 00:00:00 2001
From: Waylan Limberg
Date: Tue, 21 Jul 2009 21:35:14 -0400
Subject: Fixed Ticket 38. With smart_emphasis turned on, emphasised text can
now be wrapped in punctuation without spaces and still will be converted to
emphasis (ie: '[_foo_]'). Test included. Thanks for the report seanh.
---
markdown/inlinepatterns.py | 2 +-
tests/misc/smart_em.html | 5 +++++
tests/misc/smart_em.txt | 9 +++++++++
3 files changed, 15 insertions(+), 1 deletion(-)
create mode 100644 tests/misc/smart_em.html
create mode 100644 tests/misc/smart_em.txt
diff --git a/markdown/inlinepatterns.py b/markdown/inlinepatterns.py
index 331bead..917a9d3 100644
--- a/markdown/inlinepatterns.py
+++ b/markdown/inlinepatterns.py
@@ -69,7 +69,7 @@ STRONG_RE = r'(\*{2}|_{2})(.+?)\2' # **strong**
STRONG_EM_RE = r'(\*{3}|_{3})(.+?)\2' # ***strong***
if markdown.SMART_EMPHASIS:
- EMPHASIS_2_RE = r'(?emphasis
+this_is_not_emphasis
+[punctuation with emphasis]
+[punctuation_with_emphasis]
+[punctuation_without_emphasis]
\ No newline at end of file
diff --git a/tests/misc/smart_em.txt b/tests/misc/smart_em.txt
new file mode 100644
index 0000000..3c56842
--- /dev/null
+++ b/tests/misc/smart_em.txt
@@ -0,0 +1,9 @@
+_emphasis_
+
+this_is_not_emphasis
+
+[_punctuation with emphasis_]
+
+[_punctuation_with_emphasis_]
+
+[punctuation_without_emphasis]
--
cgit v1.2.3