When downloading files from your server to edit in code view in Dreamweaver you’ll sometimes be looking at code that is all double spaced. You can fix this by doing a find/replace right in Dreamweaver.

With the page open, hit CTRL-F and enter \n\s*\n and type Ctrl-Enter in the replace box, making sure the “Use regular expressions” box is ticked.

This should clean things right up for you.

If you’re wondering why this double spacing happens it’s because you’re downloading files from the server that has differently encoded line returns in it. For example your server is Unix and your local environment is Windows.

You can (supposedly) permanently fix these compatibility issues under your Dreamweaver preferences options. Go to Preferences, Code Format, and make sure your Line Break Type is set to the same as your server. I haven’t always had luck with this but wanted you to know the option is there.