Skip to content
This repository has been archived by the owner on May 17, 2018. It is now read-only.

Commit

Permalink
Merge pull request #214 from facelessuser/master
Browse files Browse the repository at this point in the history
Fix for when tag.text is None
  • Loading branch information
facelessuser committed Jul 6, 2014
2 parents 4bc624a + 3522cdf commit cd61289
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions markdown/extensions/headeranchor.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,13 @@ def run(self, root):
id = stashedHTML2text(''.join(itertext(tag)), self.md)
id = unique(slugify(id, self.config.get('sep')), used_ids)
tag.set('id', id)
tag.text = self.markdown.htmlStash.store(
text = self.markdown.htmlStash.store(
LINK % {"id": id},
safe=True
) + tag.text
)
if tag.text is not None:
text + tag.text
tag.text = text
return root


Expand Down

0 comments on commit cd61289

Please sign in to comment.