summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/lib/libremessages6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libremessages b/src/lib/libremessages
index b89e2bc..188affd 100755
--- a/src/lib/libremessages
+++ b/src/lib/libremessages
@@ -40,6 +40,8 @@
# Own functions #
################################################################################
+# Usage: panic
+# For programming errors, bails immediately with little fanfare.
panic() {
echo "$(_l _ 'panic: malformed call to internal function')" >&2
exit 1
@@ -54,8 +56,8 @@ print() {
printf -- "$mesg\n" "$@"
}
-# Do HTML-style whitespace collapsing on standard IO. It considers newline,
-# tab, and space to be whitespace.
+# Do HTML-style whitespace collapsing on standard IO.
+# It considers newline, tab, and space to be whitespace.
_html_whitespace_collapse() {
[[ $# == 0 ]] || panic
tr '\n' ' ' | sed -r -e 's/\t/ /g' -e 's/ +/ /g'