diff options
author | Waylan Limberg <waylan@gmail.com> | 2009-07-21 21:35:14 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2009-07-21 21:35:14 -0400 |
commit | 383916493d8d05feb8df72e61cbec15d9b5fb937 (patch) | |
tree | 61bd7a2d5e8c12ec328b5876f492fabf49f938c1 /markdown | |
parent | 93dddf9eb7b3263beda332e79ee84cf8ab9c13bb (diff) | |
download | markdown-383916493d8d05feb8df72e61cbec15d9b5fb937.tar.gz markdown-383916493d8d05feb8df72e61cbec15d9b5fb937.tar.bz2 markdown-383916493d8d05feb8df72e61cbec15d9b5fb937.zip |
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.
Diffstat (limited to 'markdown')
-rw-r--r-- | markdown/inlinepatterns.py | 2 |
1 files changed, 1 insertions, 1 deletions
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'(?<!\S)(_)(\S.+?)\2' # _emphasis_ + EMPHASIS_2_RE = r'(?<!\w)(_)(\S.+?)\2(?!\w)' # _emphasis_ else: EMPHASIS_2_RE = r'(_)(.+?)\2' # _emphasis_ |