Skip to content

Don't always insert spaces around inline tags? #16

@lopuhin

Description

@lopuhin

Example input: <div><strong>fo</strong>o</div><div>bar</div>. Current output: 'fo o\nbar', while desired output is 'foo\nbar'.

At the same time, in the changelog I find this:

Fix unwanted joins of words with inline tags: spaces are added for inline tags too, but a heuristic is used to preserve punctuation without extra spaces.

So it's not entirely clear if we should always avoid adding spaces around all inline tags. Maybe we could start with not adding them around tags such as strong, em, etc.

Also note that more common usage such as <div><strong>foo</span>, next</div> is handled correctly regardless: foo, next.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions