Commits

David Chambers  committed a50907a

Removed call to `reset` (and moved call to `convert`) to allow excerpts to inherit link definitions, fixing issue #7. (Python-Markdown's caching of link definitions actually proved useful!)

  • Participants
  • Parent commits f69705f

Comments (0)

Files changed (1)

             snippet = re.sub(RE['excerpt_pipes'], u'', capture)
             snippets.append(snippet)
             contents = contents.replace(capture, snippet)
-        md.reset()
-        self.excerpt = md.convert('\n\n'.join(snippets))
 
         # updates
         split = re.split(RE['update'], contents)
             self.html += fragment
         self.body = re.sub(RE['skip'], '', self.body)
         self.html = mark_safe(re.sub(RE['skip'], '', self.html))
-        self.excerpt = mark_safe(self.excerpt) or self.html
+        # excerpts inherit link definitions
+        self.excerpt = mark_safe(md.convert('\n\n'.join(snippets))) or self.html
         self.type = self.meta.get('type', 'post' if self.datetime else 'page')
 
         # attach comments thread