Skip to content

test(format): give the compact section in wrap-with-same-line-text a gap to re-indent - #511

Merged
JuroOravec merged 1 commit into
mainfrom
fix/corpus-wrap-same-line-text
Oct 28, 2026
Merged

JuroOravec merged 1 commit into
mainfrom
fix/corpus-wrap-same-line-text

Conversation

@JuroOravec

Copy link
Copy Markdown
Member

The formatter corpus test fails on main:

opening-tags.tags.wrap-with-same-line-text violates its formatter contract: formatter contract projection changed

#462 added this case with a compact <section ...><p>child</p></section> and expected the formatter to move the <p> onto its own line. #493 then made the formatter leave tags that touch as written, because a line break between them is new text in the rendered HTML. The two merged close together, so neither PR's CI ran with the other.

The input now has a space inside the section, <section ...> <p>child</p> </section>. The formatter re-indents that whitespace, so the case still checks what #462 added it for: moving the child onto its own line lets the start tag stay on one line. The expected output is unchanged.

Run locally: cargo test -p citry_template_formatter, all pass. The Python, LSP and VS Code tests read the same corpus files.

🤖 Generated with Claude Code

…gap to re-indent

#462 added this corpus case with a compact `<section ...><p>child</p></section>`
and expected the formatter to move the `<p>` onto its own line. #493 then
made the formatter leave tags that touch as written, so the case violated
its contract and the corpus test failed on main. The input now has a space
inside the section, which the formatter re-indents, so the case still checks
that moving the child lets the start tag stay on one line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@JuroOravec
JuroOravec merged commit 509b003 into main Oct 28, 2026
1 of 28 checks passed
@JuroOravec
JuroOravec deleted the fix/corpus-wrap-same-line-text branch October 28, 2026 19:13
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