Skip to content

fix(md): Fit thematic breaks inside quotes and lists - #989

Merged
JeanMertz merged 1 commit into
mainfrom
fit-break
Aug 23, 2026
Merged

fix(md): Fit thematic breaks inside quotes and lists#989
JeanMertz merged 1 commit into
mainfrom
fit-break

Conversation

@JeanMertz

Copy link
Copy Markdown
Collaborator

HrStyle::Line drew a rule as wide as the terminal, but a rule spans the text column rather than the terminal, and inside a blockquote or a list item that column is narrowed by the prefix every line carries. At width 40 a > quote leaves 38 columns, so a 40-column rule overflowed and wrapped onto a second line.

The width now subtracts Writer::prefix_width(), so the rule lines up with the prose above and below it wherever it appears. A rule at the top level is unaffected, since its prefix is empty.

`HrStyle::Line` drew a rule as wide as the terminal, but a rule spans
the text column rather than the terminal, and inside a blockquote or a
list item that column is narrowed by the prefix every line carries. At
width 40 a `> ` quote leaves 38 columns, so a 40-column rule
overflowed and wrapped onto a second line.

The width now subtracts `Writer::prefix_width()`, so the rule lines up
with the prose above and below it wherever it appears. A rule at the
top level is unaffected, since its prefix is empty.

Signed-off-by: Jean Mertz <git@jeanmertz.com>
@JeanMertz
JeanMertz merged commit 9e8d369 into main Aug 23, 2026
15 checks passed
@JeanMertz
JeanMertz deleted the fit-break branch August 23, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant