From: Stefan Huber Date: Wed, 17 Feb 2021 10:09:23 +0000 (+0100) Subject: Limit regex repetition to 255 X-Git-Url: https://git.sthu.org/?a=commitdiff_plain;h=6db7b3c495c6e4eff6ca2882bb992a8916d6726d;p=mutt-gruvbox.git Limit regex repetition to 255 The BSD implementation of regex has RE_DUP_MAX set to 255, e.g., see man 3 regex for openbsd. Limit the patterns to 255 to support mutt on BSD, like Mac OS X (Darwin). Fixes #1 (github) Reported-by: reportaman --- diff --git a/colors-gruvbox-shuber.muttrc b/colors-gruvbox-shuber.muttrc index c8daffb..4339fab 100644 --- a/colors-gruvbox-shuber.muttrc +++ b/colors-gruvbox-shuber.muttrc @@ -62,8 +62,9 @@ color header color142 color234 "^Subject:" color header color108 color234 "^X-Spam-Status:" color header color108 color234 "^Received:" -color body color142 color234 "[a-z]{3,256}://[-a-zA-Z0-9@:%._\\+~#=/?&,]+" -color body color142 color234 "[a-zA-Z]([-a-zA-Z0-9_]+\\.){2,256}[-a-zA-Z0-9_]{2,256}" +# BSD's regex has RE_DUP_MAX set to 255. +color body color142 color234 "[a-z]{3,255}://[-a-zA-Z0-9@:%._\\+~#=/?&,]+" +color body color142 color234 "[a-zA-Z]([-a-zA-Z0-9_]+\\.){2,255}[-a-zA-Z0-9_]{2,255}" color body color208 color234 "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+" color body color208 color234 "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+" color body color234 color214 "[;:]-*[)>(