Remove blank lines in format action

Are you missing a feature? Request it's implementation here.
ted.habermann
Posts: 5

Remove blank lines in format action

Wed Apr 29, 2009 4:48 pm

I am dealing with XML that is generated by a program that inserts blank lines in various places in the file. It would be nice if the Format and Indent Command removed these
sorin_ristache
Posts: 4144

Re: Remove blank lines in format action

Wed Apr 29, 2009 5:07 pm

Hello,

The Format and Indent action removes the blank lines if they are not included in an element that has the atribute xml:space="preserve" and if the option Preserve empty lines is not selected in Preferences -> Editor -> Format -> XML (by default it is selected). Are the blank lines included in an element listed in the Preserve Space Elements list in Preferences -> Editor -> Format -> XML?


Regards,
Sorin
ted.habermann
Posts: 5

Re: Remove blank lines in format action

Sun May 31, 2009 5:06 am

The preferences setting deals with this very nicely... Too many options to keep up with!

Thanks,
Ted
kiai
Posts: 8

Re: Remove blank lines in format action

Wed Oct 29, 2014 1:27 am

I'd like to remove blank lines while keeping long lines from breaking. Is there an option for that?
thanks!
adrian
Posts: 2337

Re: Remove blank lines in format action

Wed Oct 29, 2014 3:49 pm

Hi,

If you just want to remove the blank lines and don't need to format the document, simply use Find > Find/Replace to remove them:
Text to find: \n\s*\n
Replace with: \n
Regular expression enabled
Press Replace All to eliminate all blocks of blank lines.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Return to “Feature Request”

Who is online

Users browsing this forum: No registered users and 3 guests