Skip to content

Commit

Permalink
hide spaces from regexes
Browse files Browse the repository at this point in the history
  • Loading branch information
flammie committed Sep 9, 2024
1 parent 42ca063 commit 1ba05c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion scripts/generate-nfc-nfd-regex.bash.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ echo >> "$REGEXFILE"
tr , '\n' |\
@SED@ -e 's/^ //' |\
@SED@ -e 's/ /@_SPACE_@/g' |\
grep -E -v '^[+{@}^]' > "$REGEXFILE".sigma.nfc
grep -E -v '^[+{@}^]' |\
grep -F -v "@_SPACE_@" > "$REGEXFILE".sigma.nfc
@UCONV@ -f utf8 -x any-nfd "$REGEXFILE".sigma.nfc > "$REGEXFILE".sigma.nfd
paste "$REGEXFILE".sigma.nfc "$REGEXFILE".sigma.nfd |\
@GAWK@ '$1 != $2 {printf("%s (->) {%s},\n", $1, $2);
Expand Down
3 changes: 2 additions & 1 deletion scripts/generate-nfd-nfc-regex.bash.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ echo "" >> "$REGEXFILE"
tr , '\n' |\
@SED@ -e 's/^ //' |\
@SED@ -e 's/ /@_SPACE_@/g' |\
grep -E -v '^[+{@}^]' > "$REGEXFILE".sigma.nfd
grep -E -v '^[+{@}^]' |
grep -F -v "@_SPACE_@" > "$REGEXFILE".sigma.nfd
@UCONV@ -f utf8 -x any-nfc "$REGEXFILE".sigma.nfd > "$REGEXFILE".sigma.nfc
paste "$REGEXFILE".sigma.nfd "$REGEXFILE".sigma.nfc |\
@AWK@ '$1 != $2 {printf("%s -> {%s},\n", $1, $2);
Expand Down

0 comments on commit 1ba05c8

Please sign in to comment.