Fixing Double Line Spacing

This often happens wordpress’  internal editor.

I’ve also experienced this issue when a friend of mine used sublime text editor and I then pulled the source from the web server and it had the same double line spacing issue.

This is enough to destroy you if you try to fix this problem by hand, especially if it’s recurringly happening.

Here’s the fix:

  1. Open the file up with notepad++
  2. In the menus goto View >Show Symbol > Check “Show all characters”
    • I like to display the hidden characters in notepad++ so we can see what we’re trying to fix
    • You should now see something like there’s a [CR] at the end of the lines as well as on it’s own line
  3. Ctrl-F to bring up the find window
  4. Goto the replace tab
  5. Set the Search Mode to Extended
  6. Search for \r\r and replace with \r this is our double carriage return [CR] that produces the extra lines

If you’re using a different editor you might have to set your find and replace to use regular expressions or regex so that you can find the carriage returns / double lines / double spacing / double spaces

This entry was posted in Interesting Finds and tagged , , , , , , , , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Leave your thoughts...

You must be logged in to post a comment.