Skip to content

[7.x] Blade newline fixes#32026

Merged
taylorotwell merged 1 commit into
7.xfrom
blade-fixes
Mar 19, 2020
Merged

[7.x] Blade newline fixes#32026
taylorotwell merged 1 commit into
7.xfrom
blade-fixes

Conversation

@GrahamCampbell

@GrahamCampbell GrahamCampbell commented Mar 19, 2020

Copy link
Copy Markdown
Collaborator

The behaviour of an app should not be different depending on what OS it is deployed on. Most deployments checkout code by downloading a zip of the repo, which will have the blade views with unix style newlines. Dynamically generated stuff should also new unix style newlines, so that responses returned to users have unix style newlines, and not some a mix of unix and windows style on Windows server deployments.

@taylorotwell
taylorotwell merged commit d35856b into 7.x Mar 19, 2020
@GrahamCampbell
GrahamCampbell deleted the blade-fixes branch March 19, 2020 13:35
@imanghafoori1

Copy link
Copy Markdown
Contributor

@GrahamCampbell I still receive \r\n on windows.
But I can not see where they are coming from.
We still need some modification in order to fully remove them.

@GrahamCampbell

Copy link
Copy Markdown
Collaborator Author

Probably because you have git configured to check out the code using Windows style newlines instead of unix style.

@imanghafoori1

Copy link
Copy Markdown
Contributor

@GrahamCampbell Ok but still it should replace the windows-style with Unix before saving to storage/views, so that the cached views will never have windows style.

@GrahamCampbell

Copy link
Copy Markdown
Collaborator Author

Laravel's job is not to interfeer with the newlines you used in your own code.

@imanghafoori1

Copy link
Copy Markdown
Contributor

hmm... let's find the root cause of that. I suspect what is going on... (0_o)

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.

3 participants