Make WordPress Core

Opened 3 years ago

Closed 2 years ago

#52769 closed defect (bug) (duplicate)

Theme Editor changes line endings of edited files

Reported by: diegoe's profile diegoe Owned by:
Milestone: Priority: normal
Severity: minor Version: 5.7
Component: Administration 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 (2)

#1 @sabernhardt
2 years ago

Related/duplicate: #9716

#2 @SergeyBiryukov
2 years ago

  • Component changed from General to Administration
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi there, welcome back to WordPress Trac!

Thanks for the ticket, sorry it took a while for someone to get back to you.

#9716 has a patch that should resolve this, so let's continue there.

Note: See TracTickets for help on using tickets.