[wp-trac] [WordPress Trac] #52769: Theme Editor changes line endings of edited files
WordPress Trac
noreply at wordpress.org
Thu Mar 11 00:34:29 UTC 2021
#52769: Theme Editor changes line endings of edited files
--------------------------+-----------------------------
Reporter: diegoe | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 5.7
Severity: minor | Keywords:
Focuses: |
--------------------------+-----------------------------
If you have a theme, like twentyseventeen, that for whatever reason has
`CRLF` newlines in its files, the Theme Editor will change the file format
to regular unix newlines when saving.
This creates confusing diffs, since by default `diff` does *not* ignore
the newline characters. You can work around that with `diff --strip-
trailing-cr`, but it's a rather obscure bit of trivia, even if you "know
enough" to be using `diff`.
I think the Theme Editor shouldn't change the file newline format of the
edited files.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52769>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list