diff --git a/scripts/regex/grapheme.sh b/scripts/regex/grapheme.sh index 0b2b54d..898cc04 100644 --- a/scripts/regex/grapheme.sh +++ b/scripts/regex/grapheme.sh @@ -6,6 +6,9 @@ # This regex was manually written, derived from the rules in UAX #29. # Particularly, from Table 1c, which lays out a regex for grapheme clusters. +# Abort on undefined variables +set -u + CR="\p{gcb=CR}" LF="\p{gcb=LF}" Control="\p{gcb=Control}" diff --git a/scripts/regex/sentence.sh b/scripts/regex/sentence.sh index 689d184..ec84b2c 100644 --- a/scripts/regex/sentence.sh +++ b/scripts/regex/sentence.sh @@ -91,6 +91,9 @@ # UAX #29's recommendation in S6.2. Essentially, we use it avoid ever breaking # in the middle of a grapheme cluster. +# Abort on undefined variables +set -u + CR="\p{sb=CR}" LF="\p{sb=LF}" Sep="\p{sb=Sep}" diff --git a/scripts/regex/word.sh b/scripts/regex/word.sh index 78c7a05..13232ac 100644 --- a/scripts/regex/word.sh +++ b/scripts/regex/word.sh @@ -32,6 +32,9 @@ # # Gah. +# Abort on undefined variables +set -u + CR="\p{wb=CR}" LF="\p{wb=LF}" Newline="\p{wb=Newline}"