design. business. life.


This article was written on 25 Oct 2012, and is filled under Web Development.

Remove Extra Line Breaks in Dreamweaver

Have you ever opened a document in dreamweaver and found that every linebreak was duplicated leaving you with very messy looking code? Well, it happens. I’ve heard lot of theories as to why it happens (most likely related to Adobe Contribute integration), but I suppose that’s irrelevant when all you’re trying to do is fix it and continue on with your business. What you need is a quick solution, which I found as the Adobe forums – and summarized for you below:

  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”

And there you have it. Nice clean code (hopefully) so you can go on with your day. Hope that helps!

Leave a Reply