From e4993fc56dd222c9b11fc96b1044e39f84e4544f Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Mon, 20 Sep 2010 14:45:52 -0400 Subject: 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. --- markdown/inlinepatterns.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'markdown/inlinepatterns.py') 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 -- cgit v1.2.3