Dreamweaver adding new lines unintentionally - Quick clean [How To]

Technik

When loading a file from a server dreamweaver sometimes adds a single new line to each existing line of code or even empty lines. This happens due to problems with your tranfer type between Windows and Linux.

ASCII converts the line breaks while binary transfers files exactly how they are. Although it would be better to use ASCII for text files, you may try binary mode when transfering files from linux to windows and this problem persists.

You might be able to handle this annoying problem by sanitizing your thousands lines of code within a few seconds. Thanks to the helpful user of the adobe help forums you may save a lot of time.

  1. Open the file in Dreamweaver
  2. Click CTRL + F, or go to EDIT & FIND AND REPLACE
  3. Select "Current document" in "Find In" (You can also select the folder if you have multiple files.
  4. Search in "Source Code"
  5. Check the box labeled "Use regular expression"
  6. Type "[\r\n]{2,}" (without quotes) in "Find"
  7. Type "\n" (without quotes) in "Replace"
  8. Press "Replace All"

Source: jefflamonica, http://forums.adobe.com/message/3875804#3875804

Permalink: https://to.ptmr.io/1s94V25