summaryrefslogtreecommitdiff
path: root/src/lib/librelib
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-05-24 23:55:21 -0600
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-05-24 23:55:21 -0600
commitfdc6a869747edfc7f9ffa1603a36ee33bda0aa4f (patch)
tree4f8a47986da64d99c79d16a1178e113fb32bd0c5 /src/lib/librelib
parent315b6b0a025abb1002e03932918da7dc749a4089 (diff)
libremessages/librexgettext: Preserve two spaces after a period.
Well, [.!?] really--this matches the behavior of `fmt -u`.
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() {