aboutsummaryrefslogtreecommitdiffstats
path: root/markdown/inlinepatterns.py
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2010-09-20 14:45:52 -0400
committerWaylan Limberg <waylan@gmail.com>2010-09-20 14:45:52 -0400
commite4993fc56dd222c9b11fc96b1044e39f84e4544f (patch)
tree1737ed04ccf36e467f6744cda5e8d775726eeabf /markdown/inlinepatterns.py
parent5ee12763465d123a313d43fc0fb497636f727d34 (diff)
downloadmarkdown-e4993fc56dd222c9b11fc96b1044e39f84e4544f.tar.gz
markdown-e4993fc56dd222c9b11fc96b1044e39f84e4544f.tar.bz2
markdown-e4993fc56dd222c9b11fc96b1044e39f84e4544f.zip
Added the re.UNICODE flag to inlinepatterns. Now all inlinepattern regex will match unicode characters when \w, \b, or \s is used. Also updated docs to reflect change.
Diffstat (limited to 'markdown/inlinepatterns.py')
-rw-r--r--markdown/inlinepatterns.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/markdown/inlinepatterns.py b/markdown/inlinepatterns.py
index b5bd02b..ebc6d8d 100644
--- a/markdown/inlinepatterns.py
+++ b/markdown/inlinepatterns.py
@@ -153,7 +153,8 @@ class Pattern:
"""
self.pattern = pattern
- self.compiled_re = re.compile("^(.*?)%s(.*?)$" % pattern, re.DOTALL)
+ self.compiled_re = re.compile("^(.*?)%s(.*?)$" % pattern,
+ re.DOTALL | re.UNICODE)
# Api for Markdown to pass safe_mode into instance
self.safe_mode = False