Skip to content

Ignored div tag removes spaces. #249

@pdc1

Description

@pdc1

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions