Skip to content

Inline code span opening on one line and closing on the next isn't matched, and breaks highlighting for a subsequent header #260

Description

@denysshnurenko

What happened

An inline code span (single backtick) whose opening backtick is on one line
and closing backtick is on the next line (a valid CommonMark pattern — a
code span can contain a line ending, normalized to a space) isn't recognized
as a matched pair. After that point, markdown highlighting for the rest of
the document desyncs — specifically, the next ##/### header no longer
gets its header color, rendering as plain text instead.

Minimal repro:

- **Shape**: `SomeType { fieldA: X|Y, fieldB:
  Z, fieldC?: Int }`; more prose here.

## Next Section

Expected: "## Next Section" renders in the normal header color.
Actual: it renders as plain body text — the header styling is lost.

Expected

  • A code span split across two lines by a soft wrap or a genuine line
    break within the same paragraph should still be recognized as matched.
  • Even if a particular span is misdetected, that should stay contained to
    itself — it should not desync highlighting for markdown elements
    (headers, etc.) later in the document.

Environment

  • revdiff version: v1.4.1-5b631a9-20260522T171942
  • macOS
Image

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