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?
When I set
skip=["div"]and convert the following HTML,The result is
IgnoredStill ignoredtag.I was expectingIgnored Still ignored tag.Then I tried extending the converter class, so
convert_div(...)returns" " + text + " ", but that resulted in a trailing space ifdivwas the last tag (e.g.,<span>Ignored <div>Still ignored</div></span>converts toIgnored Still ignored<- trailing space).Shouldn't the trailing space have been stripped by the default
strip_document=STRIP?