diff options
Diffstat (limited to 'markdown/extensions')
-rw-r--r-- | markdown/extensions/abbr.py | 5 | ||||
-rw-r--r-- | markdown/extensions/def_list.py | 5 | ||||
-rw-r--r-- | markdown/extensions/fenced_code.py | 3 | ||||
-rw-r--r-- | markdown/extensions/footnotes.py | 5 | ||||
-rw-r--r-- | markdown/extensions/headerid.py | 5 | ||||
-rw-r--r-- | markdown/extensions/meta.py | 3 | ||||
-rw-r--r-- | markdown/extensions/rss.py | 2 | ||||
-rw-r--r-- | markdown/extensions/tables.py | 2 | ||||
-rw-r--r-- | markdown/extensions/toc.py | 2 | ||||
-rw-r--r-- | markdown/extensions/wikilinks.py | 2 |
10 files changed, 20 insertions, 14 deletions
diff --git a/markdown/extensions/abbr.py b/markdown/extensions/abbr.py index 783220e..e2443a7 100644 --- a/markdown/extensions/abbr.py +++ b/markdown/extensions/abbr.py @@ -23,8 +23,9 @@ Copyright 2007-2008 ''' -import markdown, re -from markdown import etree +import re +import markdown +from markdown.misc import etree # Global Vars ABBR_REF_RE = re.compile(r'[*]\[(?P<abbr>[^\]]*)\][ ]?:\s*(?P<title>.*)') diff --git a/markdown/extensions/def_list.py b/markdown/extensions/def_list.py index 7a8d9e7..d16196e 100644 --- a/markdown/extensions/def_list.py +++ b/markdown/extensions/def_list.py @@ -19,8 +19,9 @@ Copyright 2008 - [Waylan Limberg](http://achinghead.com) """ -import markdown, re -from markdown import etree +import re +import markdown +from markdown.misc import etree class DefListProcessor(markdown.blockprocessors.BlockProcessor): diff --git a/markdown/extensions/fenced_code.py b/markdown/extensions/fenced_code.py index 23dc7b5..4bcb5be 100644 --- a/markdown/extensions/fenced_code.py +++ b/markdown/extensions/fenced_code.py @@ -61,7 +61,8 @@ Dependencies: """ -import markdown, re +import re +import markdown from markdown.extensions.codehilite import CodeHilite, CodeHiliteExtension # Global vars diff --git a/markdown/extensions/footnotes.py b/markdown/extensions/footnotes.py index e1a9cda..a3d540f 100644 --- a/markdown/extensions/footnotes.py +++ b/markdown/extensions/footnotes.py @@ -23,8 +23,9 @@ Example: """ -import re, markdown -from markdown import etree +import re +import markdown +from markdown.misc import etree FN_BACKLINK_TEXT = "zz1337820767766393qq" NBSP_PLACEHOLDER = "qq3936677670287331zz" diff --git a/markdown/extensions/headerid.py b/markdown/extensions/headerid.py index 6806818..de6bcf1 100644 --- a/markdown/extensions/headerid.py +++ b/markdown/extensions/headerid.py @@ -66,7 +66,8 @@ Dependencies: """ import markdown -from markdown import CRITICAL, etree, message +from markdown.misc import etree +from markdown.misc_logging import CRITICAL, message import re from string import ascii_lowercase, digits, punctuation @@ -108,7 +109,7 @@ class HeaderIdProcessor(markdown.blockprocessors.BlockProcessor): level = len(m.group('level')) + start_level if level > 6: level = 6 - h = markdown.etree.SubElement(parent, 'h%d' % level) + h = etree.SubElement(parent, 'h%d' % level) h.text = m.group('header').strip() if m.group('id'): h.set('id', self._unique_id(m.group('id'))) diff --git a/markdown/extensions/meta.py b/markdown/extensions/meta.py index 1b555b2..e0c2414 100644 --- a/markdown/extensions/meta.py +++ b/markdown/extensions/meta.py @@ -39,8 +39,9 @@ Contact: markdown@freewisdom.org License: BSD (see ../docs/LICENSE for details) """ +import re -import markdown, re +import markdown # Global Vars META_RE = re.compile(r'^[ ]{0,3}(?P<key>[A-Za-z0-9_-]+):\s*(?P<value>.*)') diff --git a/markdown/extensions/rss.py b/markdown/extensions/rss.py index 1274da2..64f7be1 100644 --- a/markdown/extensions/rss.py +++ b/markdown/extensions/rss.py @@ -1,5 +1,5 @@ import markdown -from markdown import etree +from markdown.misc import etree DEFAULT_URL = "http://www.freewisdom.org/projects/python-markdown/" DEFAULT_CREATOR = "Yuri Takhteyev" diff --git a/markdown/extensions/tables.py b/markdown/extensions/tables.py index 1d3c920..009f161 100644 --- a/markdown/extensions/tables.py +++ b/markdown/extensions/tables.py @@ -15,7 +15,7 @@ A simple example: Copyright 2009 - [Waylan Limberg](http://achinghead.com) """ import markdown -from markdown import etree +from markdown.misc import etree class TableProcessor(markdown.blockprocessors.BlockProcessor): diff --git a/markdown/extensions/toc.py b/markdown/extensions/toc.py index fd2a86a..46798f5 100644 --- a/markdown/extensions/toc.py +++ b/markdown/extensions/toc.py @@ -9,7 +9,7 @@ Dependencies: """ import markdown -from markdown import etree +from markdown.misc import etree import re class TocTreeprocessor(markdown.treeprocessors.Treeprocessor): diff --git a/markdown/extensions/wikilinks.py b/markdown/extensions/wikilinks.py index df44e1c..2da207f 100644 --- a/markdown/extensions/wikilinks.py +++ b/markdown/extensions/wikilinks.py @@ -121,7 +121,7 @@ class WikiLinks(markdown.inlinepatterns.Pattern): base_url, end_url, html_class = self._getMeta() label = m.group(2).strip() url = self.config['build_url'][0](label, base_url, end_url) - a = markdown.etree.Element('a') + a = markdown.misc.etree.Element('a') a.text = label a.set('href', url) if html_class: |