[wp-trac] [WordPress Trac] #9716: WordPress Theme/Plugin editor adds blank lines

WordPress Trac wp-trac at lists.automattic.com
Thu Apr 19 23:30:42 UTC 2012


#9716: WordPress Theme/Plugin editor adds blank lines
-------------------------------------+-----------------------------
 Reporter:  Vistronic                |       Owner:  anonymous
     Type:  defect (bug)             |      Status:  reopened
 Priority:  normal                   |   Milestone:  Future Release
Component:  Editor                   |     Version:  2.7.1
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+-----------------------------

Comment (by kurtpayne):

 Replying to [comment:15 nacin]:
 > we should just detect the line endings of the current file, normalize
 them on display, and then save them based on the original detection.

 What's the best way to detect line endings?  A file could have mixed line
 endings throughout.  Here's an edge case:

 1. User 1 uploads a file with DOS line endings
 2. User 2 edits the file in vi (`^M` all over the place), makes a few
 surgical edits (now some unix line endings in the file), re-saves it
 3. User 3 edits the file through WP

 How does !WordPress know how to restore the original line endings when
 User 3 saves the file?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9716#comment:17>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list