From: Matthieu Moy Date: Fri, 03 Jun 2016 06:41:53 GMT Subject: Re: [PATCH] userdiff: add built-in pattern for CSS Message-ID: In-Reply-To: <57511B2D.7040501@kdbg.org> Johannes Sixt 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/