Test that an extension can exclude parent tags.
(self)
| 958 | self.md = markdown.Markdown(extensions=[TestAncestorExclusion.AncestorExtension()]) |
| 959 | |
| 960 | def test_ancestors(self): |
| 961 | """ Test that an extension can exclude parent tags. """ |
| 962 | test = """ |
| 963 | Some +test+ and a [+link+](http://test.com) |
| 964 | """ |
| 965 | result = """<p>Some <strong>test</strong> and a <a href="http://test.com">+link+</a></p>""" |
| 966 | |
| 967 | self.md.reset() |
| 968 | self.assertEqual(self.md.convert(test), result) |
| 969 | |
| 970 | def test_ancestors_tail(self): |
| 971 | """ Test that an extension can exclude parent tags when dealing with a tail. """ |