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, 3 insertions, 1 deletions
diff --git a/src/lib/librelib b/src/lib/librelib
index 3d7795c..e4c933a 100755
--- a/src/lib/librelib
+++ b/src/lib/librelib
@@ -35,7 +35,9 @@ print() {
}
_html_whitespace_collapse() {
- tr '\n' ' ' | sed -r -e 's/\t/ /g' -e 's/ +/ /g'
+ tr '\n' '\r' | sed -r \
+ -e 's/\r/ /g' -e 's/\t/ /g' \
+ -e 's/(^|[^.!? ]) +/\1 /g' -e 's/([.!?]) +/\1 /g'
}
prose() {