You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: indenting heading borders with single empty line between
## Details
When looking at headings separated by a single blank line and no other
content the alignement would of heading borders was not calculated
properly with indent and heading borders enabled. For example with the
following text:
```text
# Heading 1
## Heading 2
# Heading 1
```
We would end up overindent the bottom border of the first heading and
under indenting the bottom row of the seconding heading.
Both of these were caused by how section ownership was changed in a
recent change. In terms ownership the second heading owns the line below
the first heading and the third heading owns the line below the second
heading. However when actually adding a border we assume top down
ownership. By adding a line owned by a different section we end up with
the misalignment.
To fix this only extend ownership of a section upwards if there is more
than a single blank line. If it is just the single line than do not
extend the section. Very similar logic applies for contracting upward.
Only do this if the section does not rely on that blank line to exist.
0 commit comments