Re: [PATCH] userdiff: add built-in pattern for CSS
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Jun 3, 2016, 06:41 UTC
- Message-ID
- <vpqr3ce6afi.fsf@anie.imag.fr>
- In-Reply-To
- <57511B2D.7040501@kdbg.org>
Johannes Sixt <j6t@kdbg.org> writes:
Show 5 quoted lines
>> +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/