Re: [PATCH take 3 0/4] color-words improvements
- From
Boyd Stephen Smith Jr. <bss@iguanasuicide.net>
- Date
- Jan 14, 2009, 22:24 UTC
- Message-ID
- <200901141624.38315.bss@iguanasuicide.net>
- In-Reply-To
- <alpine.DEB.1.00.0901142258250.3586@pacific.mpi-cbg.de>
On Wednesday 2009 January 14 16:06:48 Johannes Schindelin wrote:
Show 16 quoted lines
>On Wed, 14 Jan 2009, Thomas Rast wrote: >> Bug aside, examples like this one make me wonder if we should force a >> "last resort" match for `[^[:space:]]`. For example, >> >> -aaa [aaa] >> +aaa (aaa) aaa >> >> would still give you >> >> aaa (aaa)<GREEN> aaa<RESET> >> >> which may be unexpected. > >But why should it be unexpected? If people say that every length of "a" >makes a word, and consequently everything else is clutter, then that's >that, no?
I think some people are going to have problems with the strict dichotomy between "part of a word" and "ignorable whitespace" that is being set up. It makes sense technically, but it could confuse.
Imagine with --diff-words=[A-Z][A-Za-z]* and the following change: -To be Or Not To be. +To ignore Or Not To treat whitespace differently.
I think there is value in being able to ignore anything that's not a word, so the documentation that mentions adding '|[^[:space:]]' to your regex seems sufficient to me.
-- Boyd Stephen Smith Jr. ,= ,-_-. =. bss@iguanasuicide.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/ \_/