color-words: enable REG_NEWLINE to help user
commita05073c7a56703e173a82018f54dab173629d51a
authorThomas Rast <trast@student.ethz.ch>
Wed, 14 Jan 2009 21:47:00 +0000 (14 22:47 +0100)
committerThomas Rast <trast@student.ethz.ch>
Sat, 17 Jan 2009 16:14:32 +0000 (17 17:14 +0100)
tree3520ab91c449e1d9222a401504e26a8ab467397c
parenta5eaafb534329c7df9d724ac1938c64145621a9c
color-words: enable REG_NEWLINE to help user

We silently truncate a match at the newline, which may lead to
unexpected behaviour, e.g., when matching "<[^>]*>" against

  <foo
  bar>

since then "<foo" becomes a word (and "bar>" doesn't!) even though the
regex said only angle-bracket-delimited things can be words.

To alleviate the problem slightly, use REG_NEWLINE so that negated
classes can't match a newline.  Of course newlines can still be
matched explicitly.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
diff.c