Skip to content

Adjacent-link separator dropped when the second link is wrapped in formatting #96

Open

Description

@morisil

Follow-up from the second review of #92.

SeparateUnwrappedBlocks.kt emits the separator between adjacent links right before the <a> mark. If an inline wrapper is already open, that puts the separator inside it. dropHtmlStructuralWhitespace then drops it, because leftQualifies is false after an opening tag. So links wrapped in formatting still merge into one word.

Repro

<p><a href=u>x</a><b><a href=v>y</a></b></p> (the Hacker News masthead shape, reversed) still renders [x](u)**[y](v)**.

Fix

Emit the separator before the first inline mark opened since the previous token.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions