Skip to content

suggested tweak for explicit newline #3

@PerBothner

Description

@PerBothner

As rendered, an explicit newline at the end of a block collapses with a "required newline". Consider

<div>line1<span>&#xA;</span></div><div>line2</div>

This is rendered (in my experience) with no blank line in between.

If you want to model this, perhaps tweak the specification a bit. For example replace item 5 by:

For each remaining run of consecutive "required line break count" items calculate the maximum of the values in the "required line break count" items. Subtract one if the previous item is a string that ends in a newline. Replace the run with a string consisting of that many newline characters.

or by:

Replace each remaining run of consecutive "required line break count" items with a string consisting of as many newline characters as the maximum of the values in the "required line break count" items, subtracted by one if the previous item is a string that ends in a newline.

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