WordPress.org

Make WordPress Core

Opened 5 months ago

#52769 new defect (bug)

Theme Editor changes line endings of edited files

Reported by: diegoe Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version: 5.7
Component: General Keywords:
Focuses: Cc:

Description

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.

Change History (0)

Note: See TracTickets for help on using tickets.