Date: Tue, 24 Nov 2009 13:19:42 -0800 From: Gary Kline <kline@thought.org> To: FreeBSD Mailing List <freebsd-questions@FreeBSD.ORG> Subject: Re: need a newline between paragraphs.... Message-ID: <20091124211942.GF54631@thought.org> In-Reply-To: <20091124200741.GA1799@guilt.hydra> References: <20091124002920.GA51110@thought.org> <20091124003652.GH11723@hal.rescomp.berkeley.edu> <20091124013934.GA51279@thought.org> <20091124200741.GA1799@guilt.hydra>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Nov 24, 2009 at 01:07:41PM -0700, Chad Perrin wrote: > 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. > precisely. in this case, every paragraph that is not on a newline wraps. so anything that has an EOL is a new paragraph. there are a few places that require different formatting; these are easily re-done thanks to OOo! > -- > Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] -- Gary Kline kline@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org The 7.31a release of Jottings: http://jottings.thought.org/index.php
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091124211942.GF54631>