Subject: Re: [PATCH] userdiff: add built-in pattern for CSS

From: Matthieu Moy <[email-masked]>
Date: Fri, 03 Jun 2016 08:41:53 +0200

Johannes Sixt <[email-masked]> writes:

>> +IPATTERN("css",
>> +	 "!^.*;\n"
>
> Is there a difference between this and "!;\n"? Is it necessary to
> anchor the pattern at the beginning of the line?

Also, you don't want to force the end of line right after ;. I know
trailing whitespaces are evil, but users may not deserve to be punished
so hard when they have some ;-).

> In the commit message you talk about colon (':'), but you actually use
> a semicolon (';'). Thinking a bit more about it, rejecting lines with
> either one would be even better. Consider this case (without the
> indentation):

Rejecting colon anywhere in the line would also reject valid patterns
like this:

a:hover {

Rejecting it at end of line is probably a good trade-off.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/