Markdown summary should not include content footnote

Markdown instance carries state for subsequent uses. Content
and summary parsing is done with the same instance. Since
footnotes are processed with an extension and stored as state,
content footnote is duplicated for summary.

This PR adds a ``.reset()`` call before summary parsing to clear
the state. It also adds a test case with footnotes.
This commit is contained in:
Deniz Turgut 2013-05-10 03:50:33 -04:00
commit 75f214103e
4 changed files with 50 additions and 1 deletions

View file

@ -90,7 +90,9 @@ class TestArticlesGenerator(unittest.TestCase):
'TestCategory', 'article'],
['This is a super article !', 'published', 'yeah', 'article'],
['マックOS X 10.8でパイソンとVirtualenvをインストールと設定',
'published', '指導書', 'article']
'published', '指導書', 'article'],
['Article with markdown containing footnotes', 'published',
'Default', 'article']
]
self.assertEqual(sorted(articles_expected), sorted(articles))