diff options
author | Toshio Kuratomi <toshio@fedoraproject.org> | 2010-07-05 14:22:22 -0400 |
---|---|---|
committer | Toshio Kuratomi <toshio@fedoraproject.org> | 2010-07-05 14:22:22 -0400 |
commit | b50560edc707241b236f9d6c3f33edcf09d7cf33 (patch) | |
tree | cbb7d24f0784d05730bd3c637bb9e163c933c047 /markdown/blockparser.py | |
parent | cf1e33c216b1ea5ce18f660025744d9f8b66fb7c (diff) | |
download | markdown-b50560edc707241b236f9d6c3f33edcf09d7cf33.tar.gz markdown-b50560edc707241b236f9d6c3f33edcf09d7cf33.tar.bz2 markdown-b50560edc707241b236f9d6c3f33edcf09d7cf33.zip |
Break cyclic import of markdown. This allows people to embed markdown
if they desire.
Diffstat (limited to 'markdown/blockparser.py')
-rw-r--r-- | markdown/blockparser.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/markdown/blockparser.py b/markdown/blockparser.py index e18b338..915d6c0 100644 --- a/markdown/blockparser.py +++ b/markdown/blockparser.py @@ -1,5 +1,6 @@ -import markdown +import misc +import odict class State(list): """ Track the current and nested state of the parser. @@ -42,7 +43,7 @@ class BlockParser: """ def __init__(self): - self.blockprocessors = markdown.odict.OrderedDict() + self.blockprocessors = odict.OrderedDict() self.state = State() def parseDocument(self, lines): @@ -56,9 +57,9 @@ class BlockParser: """ # Create a ElementTree from the lines - self.root = markdown.etree.Element(markdown.DOC_TAG) + self.root = misc.etree.Element(misc.DOC_TAG) self.parseChunk(self.root, '\n'.join(lines)) - return markdown.etree.ElementTree(self.root) + return misc.etree.ElementTree(self.root) def parseChunk(self, parent, text): """ Parse a chunk of markdown text and attach to given etree node. |