Strip the given tag from the end of the stack if it was just opened.
Returns True if the strip was successful.
- if not (self.just_opened \
- and self.open_simple_tags \
+ if not (self.open_simple_tags \
and self.open_simple_tags == tag):
for stack, idx in self._reverse_stack_iter():
+Make sure empty lines aren't polluted with broken-up tags.
+>>> convert('<strong><em>Text.<br /></em></strong>')
Ensure sole images aren't unnecessarily indented.
>>> convert('<div>Text.</div><div><img src="image.jpg" /></div>')