Repository navigation
test(format): give the compact section in wrap-with-same-line-text a gap to re-indent - #511
Merged
Merged
Conversation
…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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The formatter corpus test fails on main:
#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