Re: Remove unnecessary empty lines in article body. New feature?

Martin Klaiber <[email protected]> Mon, 6 Oct 2008 12:00:57 +0200
Newsgroups gmane.network.tin.devel
Message-ID <[email protected]>
Dennis Preiser <[email protected]> wrote:
> On 03.10.2008, at 03:17, Martin Klaiber wrote:

>> So, if you add your feature, I would be pleased if you extend it by an
>> option to add such a blank line between quoted paragraphs.

> In my mind it is not a good idea to mix 'remove lines' and 'insert  
> lines' within one option. If it is agreed to implement this feature,  
> I would suggest to make it a separate option.

I wrote: [...] extend it by an option [...]. Not: put it in one option.
So that's exactly what I meant: an extra option to add a blank line.

> I think it is not possible to detect quoted blank lines, because the  
> user can change the quote_regex. For instance, the quote_regex could  
> match a string from the beginning of a line until the end (^ 
> [sophisticated_stuff]$).

quote_regex concerns only the highlighting of quoted lines, doesn't
it? But it brings me to an idea: why don't you use quote_regex[2,3]
to detect quoted blank lines? If quote_regex is followed by 0 or more
matches of whitespace and \n then it is a blank line. So the user can
choose what is called a blank line. And it is to his responsibility
to choose a useful quote_regex.

> If there is a way to detect quoted empty lines the feature you  
> suggested would be useful, alas I don't see a way to detect those  
> lines till now.

Yes, it's not possible to detect all cases but if you just detect the
common quote-mark '>' you get probably 90% of all cases and improve the
feature a lot. A blank line in regex could be:

   ^(>*)([:space:]*)$

Or, to improve it, use quote_regex instead of '^(>*)'.

Martin