Skip to content

Skip Inline Code Spans When Numbering an Inline Markdown Comment #3414

Closed

Description

@ptr727

Problem

The prose gate numbers an inline Markdown HTML comment by searching the paragraph's source lines for the comment's own text, resuming after the previous comment. Where an inline code span earlier in the same paragraph holds that exact text, the search stops on the code span's line, so a comment-wrap or comment-case finding on the real comment is reported one line too early, and a --diff run touching only the comment's real line drops it.

Reproduction (constructed)

Write `<!-- check this later. -->` here,
then <!-- check this later. -->

comment-case reports line 1 rather than line 2.

What fixing it needs

The search advanced past each code_inline child's source text as well as past each comment, so a code span can never be where a later comment is found.

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