On Mon, Nov 23, 2009 at 05:39:35PM -0800, Gary Kline wrote:
> 
>       PS: is there any one-liner to add back one newline between
>       paragraphs?

As someone else said -- that depends on how you define a "paragraph" in
the file.  If any time there's a newline you've got a new paragraph, you
can just use a simple substitution regex to replace all instances of one
newline with two newlines.  If some of your paragraphs are already
separated by two newlines, you could just use \n+ in the matching part of
your substitution regex to indicate that you want any instance of one or
more newlines in succession to be replaced with exactly two newlines --
if that doesn't screw up some other formatting you have in the file.

In order to answer this question properly, we'd need to know more about
how you define "paragraph" in this context, and whether there are special
cases of non-paragraph formatting that might cause conflicts with
paragraph formatting while doing a substitution.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]

Attachment: pgph68SyEyeB2.pgp
Description: PGP signature

Reply via email to