Skip to content

Blink parity: do not add a trailing newline to inline-HTML-ending files - #142

Merged
TomasVotruba merged 1 commit into
mainfrom
tv-blink-parity-floor
Oct 5, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
tv-blink-parity-floor

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

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.php template 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.

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.
@TomasVotruba
TomasVotruba enabled auto-merge (squash) October 5, 2026 12:21
@TomasVotruba
TomasVotruba merged commit d2440a7 into main Oct 5, 2026
18 checks passed
@TomasVotruba
TomasVotruba deleted the tv-blink-parity-floor branch October 5, 2026 12:22
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