Skip to content

Drop the space after the open tag where a newline follows it - #28

Open
danslo wants to merge 1 commit into
rectorphp:mainfrom
danslo:fix-open-tag-space
Open

danslo wants to merge 1 commit into
rectorphp:mainfrom
danslo:fix-open-tag-space

Conversation

@danslo

@danslo danslo commented Nov 18, 2026

Copy link
Copy Markdown

The formatter wrote <?php with a trailing space, followed by the newline that starts the code, which left trailing whitespace on the first line. It now writes <?php where a newline follows. The space stays where nothing else separates the tag from the code.

Updated the expected output of three formatter tests. Open PRs #15 and #19 add tests that expect <?php with the space, so whichever of them merges after this one needs those expectations updated.

The formatter wrote <?php followed by a space and then the newline that starts the code, leaving trailing whitespace on the line. The space is only needed where no whitespace follows the tag.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant