David Chambers avatar 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!)

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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.