Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions scripts/regex/grapheme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
3 changes: 3 additions & 0 deletions scripts/regex/sentence.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
3 changes: 3 additions & 0 deletions scripts/regex/word.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
#
# Gah.

# Abort on undefined variables
set -u

CR="\p{wb=CR}"
LF="\p{wb=LF}"
Newline="\p{wb=Newline}"
Expand Down
Loading