View Single Post
Old 10-26-2010, 04:42 AM   #2
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,558
Karma: 19620479
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
I guess true paragraph breaks are represented as two consecutive breaks (aka empty line), right?

In that case, you can use something like (without regexp):

Replace all paragraph breaks with "¬" (or some other unused char).
Replace all occurrences of "¬¬" with a paragraph break.
Replace all other occurrences of "¬" with a space.
Jellby is offline   Reply With Quote