Blink parity: do not add a trailing newline to inline-HTML-ending files - #142
Merged
Merged
Conversation
php-cs-fixer's SingleBlankLineAtEof skips a file whose last token is inline HTML, a close tag or an open tag, so a template ending in "</html>" keeps no final newline. blink appended one unconditionally; now it leaves such endings alone.
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.
Matches php-cs-fixer
SingleBlankLineAtEofFixer, which skips a file whose last token is inline HTML or a tag (T_INLINE_HTML/T_CLOSE_TAG/T_OPEN_TAG). blink appended a trailing newline unconditionally, diverging from ECS on.html.phptemplate files that end in inline HTML.Zero-risk correctness fix: unit test added, full blink suite + go vet + golangci-lint green, strict rector-src 1:1 gate stays 0-diff, zero mautic regressions. Parity count is unchanged (the two webhook templates also carry a separate inline-HTML array-indentation divergence, so they do not fully flip yet), but blink no longer mis-adds a newline to any inline-HTML-ending file.