python-markdownify
python-markdownify copied to clipboard
Ignored div tag removes spaces.
When I set skip=["div"] and convert the following HTML,
<span>Ignored <div>Still ignored</div> tag.</span>
The result is IgnoredStill ignoredtag. I was expecting Ignored Still ignored tag.
Then I tried extending the converter class, so convert_div(...) returns " " + text + " ", but that resulted in a trailing space if div was the last tag (e.g., <span>Ignored <div>Still ignored</div></span> converts to Ignored Still ignored <- trailing space).
Shouldn't the trailing space have been stripped by the default strip_document=STRIP?