WordPress.org

Ready to get started?Download WordPress

Forums

Built-in text editor adds extra line breaks on save (4 posts)

  1. philpeeps
    Member
    Posted 9 years ago #

    I tried searching here and with google but no luck. Why do the built-in plugin and theme editors add extra blank lines with every save....

    For example,

    code
    code
    code

    would become

    code

    code

    code

    upon saving with the built in editor...

  2. patrickw
    Member
    Posted 9 years ago #

    It is because of carriage returns. When the file is saved it is saved with /r/n which normally in windows means one break like the first example you have but on this it is used to either just /r or just /n so when you put both together you get two breaks.

    Open it up in a hex editor and get rid of them and that should do the trick.

  3. philpeeps
    Member
    Posted 9 years ago #

    Ok...so it is just an annoying idiosyncrasy that cannot be fixed? Sometimes when making a quick change it is nice to use the built in editors, but then it makes clean up a pain when I finally open the files in a regular text editor after several edits from WordPress....

  4. greatbananas
    Member
    Posted 8 years ago #

    I have the exact same problem!!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.