diff options
author | Yuri Takhteyev <yuri@freewisdom.org> | 2008-10-13 01:35:25 -0700 |
---|---|---|
committer | Yuri Takhteyev <yuri@freewisdom.org> | 2008-10-13 01:35:25 -0700 |
commit | d55e2f8168c7d0f3c1ed331184b58fbaa87e990e (patch) | |
tree | 6a1612d92a0465dcdf6418af5938adb0a2175245 /markdown.py | |
parent | 8a67923cbc704e45434905d34abad54ada97ab20 (diff) | |
download | markdown-d55e2f8168c7d0f3c1ed331184b58fbaa87e990e.tar.gz markdown-d55e2f8168c7d0f3c1ed331184b58fbaa87e990e.tar.bz2 markdown-d55e2f8168c7d0f3c1ed331184b58fbaa87e990e.zip |
Fixing the footnotes extension and corresponding fixes to markdown.py.
Diffstat (limited to 'markdown.py')
-rwxr-xr-x | markdown.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/markdown.py b/markdown.py index e6acd05..77610f9 100755 --- a/markdown.py +++ b/markdown.py @@ -515,14 +515,14 @@ class MarkdownParser: Returns: None """ - detabbed, theRest = self.__detectTabbed(lines) + detabbed, theRest = self.detectTabbed(lines) pre = etree.SubElement(parentElem, "pre") code = etree.SubElement(pre, "code") text = "\n".join(detabbed).rstrip()+"\n" code.text = AtomicString(text) self.parseChunk(parentElem, theRest, inList) - def __detectTabbed(self, lines): + def detectTabbed(self, lines): """ Find indented text and remove indent before further proccesing. Keyword arguments: @@ -1848,8 +1848,7 @@ class Markdown: SimpleTagPattern(EMPHASIS_2_RE, 'em'), ">emphasis") # The order of the handlers matters!!! - - self.inlineProcessor = InlineProcessor(self.inlinePatterns.heapsorted()) + self.references = {} self.htmlStash = HtmlStash() self.registerExtensions(extensions = extensions, @@ -1933,7 +1932,8 @@ class Markdown: tree = self.parser.parseDocument(self.lines) # Apply inline patterns - root = self.inlineProcessor.applyInlinePatterns(tree).getroot() + inlineProcessor = InlineProcessor(self.inlinePatterns.heapsorted()) + root = inlineProcessor.applyInlinePatterns(tree).getroot() # Run the post-processors for postprocessor in self.postprocessors.heapsorted(): @@ -2077,9 +2077,9 @@ def load_extension(ext_name, configs = []): try: return module.makeExtension(configs.items()) except: - message(WARN, "Failed to instantiate extension '%s'" % ext_name) + message(CRITICAL, "Failed to instantiate extension '%s'" % ext_name) else: - message(WARN, "Failed loading extension '%s' from '%s' or '%s'" + message(CRITICAL, "Failed loading extension '%s' from '%s' or '%s'" % (ext_name, module_name_new_style, module_name_old_style)) def load_extensions(ext_names): |