diff options
author | Yuri Takhteyev <yuri@freewisdom.org> | 2008-12-04 14:43:47 -0800 |
---|---|---|
committer | Yuri Takhteyev <yuri@freewisdom.org> | 2008-12-04 14:43:47 -0800 |
commit | cd73ef768613ae2b3683f8e926f405562bc37e39 (patch) | |
tree | 26d6e541aa8b38e6c66787de134217e15fa35e33 /markdown | |
parent | 6a1309229ecfd11b73ed4771d348e845e419efe6 (diff) | |
download | markdown-cd73ef768613ae2b3683f8e926f405562bc37e39.tar.gz markdown-cd73ef768613ae2b3683f8e926f405562bc37e39.tar.bz2 markdown-cd73ef768613ae2b3683f8e926f405562bc37e39.zip |
Different way of importing htmlentitydefs for python 3.0 and disabling diff output in test-markdown.py for
the same.
Diffstat (limited to 'markdown')
-rw-r--r-- | markdown/inlinepatterns.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/markdown/inlinepatterns.py b/markdown/inlinepatterns.py index 5030170..d666d6d 100644 --- a/markdown/inlinepatterns.py +++ b/markdown/inlinepatterns.py @@ -44,7 +44,11 @@ So, we apply the expressions in the following order: import markdown import re from urlparse import urlparse, urlunparse -import htmlentitydefs +import sys +if sys.version >= "3.0": + from html import entities as htmlentitydefs +else: + import htmlentitydefs """ The actual regular expressions for patterns |