Skip to content

FIX: Escape setext underlines that follow a hard line break - #81

Closed
RubenOussoren wants to merge 1 commit into
mainfrom
escape-setext-after-line-break
Closed

FIX: Escape setext underlines that follow a hard line break#81
RubenOussoren wants to merge 1 commit into
mainfrom
escape-setext-after-line-break

Conversation

@RubenOussoren

Copy link
Copy Markdown
Contributor

Previously, text after a LineBreak was escaped without paragraph context, so a line of = or - after <br> cooked as a setext heading underline and turned the whole preceding paragraph into a heading.

This change threads an after_line_break? flag through RenderContext and the renderer so MarkdownEscaper#escape treats that first line as continuing the paragraph above.

@RubenOussoren RubenOussoren self-assigned this Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants