Skip to content

TextMergeWithOffsets adds spaces in indented code blocks #922

@jorendorff

Description

@jorendorff

TextMergeWithOffsets can merge text nodes that are not actually adjacent in the source document.

The default Parser parses an indented code block as a series of text events, one per line. TextMergeWithOffsets merges all of these into a single event; but the text for that event is borrowed and contains the extra indentation characters in between those nodes. (These are usually spaces, but I think they could even contain > characters if the code block is in a block quote.)

I think this must be a bug. It's surprising and hard to work around, and I don't think TextMergeStream behaves this way.

The code with the bug is here.

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