summaryrefslogtreecommitdiff
path: root/src/lib/librelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/librelib')
-rwxr-xr-xsrc/lib/librelib4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/librelib b/src/lib/librelib
index bc5c5ed..e9d184e 100755
--- a/src/lib/librelib
+++ b/src/lib/librelib
@@ -34,14 +34,14 @@ print() {
printf -- "$mesg\n" "$@"
}
-whitespace-collapse() {
+whitespace_collapse() {
tr '\n' '\r' | sed -r \
-e 's/\r/ /g' -e 's/\t/ /g' \
-e 's/(^|[^.!? ]) +/\1 /g' -e 's/([.!?]) +/\1 /g'
}
prose() {
- local mesg="$(_ "$(whitespace-collapse <<<"$1")")"; shift
+ local mesg="$(_ "$(whitespace_collapse <<<"$1")")"; shift
printf -- "$mesg" "$@" | fmt -u
}