Edit:
The issue is that windows uses CRLF line endings. When a file is saved in the template editor the files gets converted to LF. Because of the difference between the line endings, all lines are marked as changed.
Windows WAMP server
This is an issue create due to a discussion on #38823
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
I doubt that the original PHP file is \n line ending, which makes sense. And after saving on Windows via PHP, it's converted into \r\n or maybe the browser is smart enough so it uses \r\n in for the textarea and send the content to backend for saving. But I am not sure why Brian can't reproduce that.
My windows machine saves the files as CRLF and when I convert the file back to LF the diff works.
I can add a new option to my diff lib so that it removes line ending chars before doing diff.
I guess that will fix things.
@jfcherng if you have a fix, please mention @brianteeman so he can update the library. After the update I'll make sure it gets the tests needed to get the changes in the core.
@brianteeman php-diff has released both v6.14.0 (PHP>=7.4) and v6.10.9 (PHP>=7.1), which add a new differ option ignoreLineEnding
. Turn on that differ option should avoid this issue.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-03-10 14:17:24 |
Closed_By | ⇒ | RickR2H |
Closed as having a PR #40070
Labels |
Removed:
No Code Attached Yet
|
@brianteeman issue is created.