set -e
}
-#### Filter that squeezes blank lines, emulating GNU cat -s.
+#### Filter that squeezes blank lines, partially emulating GNU cat -s,
+#### but sufficient for our purpose.
+#### From http://www-rohan.sdsu.edu/doc/sed.html, compiled by Eric Pement.
squeeze_lines() {
- awk '!length() && e {next} {e = !length()} 1'
+ sed '/^$/N;/\n$/D'
}
-#### Filter that inserts initial whitespace and converts non-breakable
-#### space U+00A0 to an ASCII space.
+#### Filter that converts non-breakable space U+00A0 to an ASCII space.
prepare_space() {
- sed 's/^/ /; s/'"`printf '\\302\\240'`"'/ /g'
+ sed 's/'"`printf '\\302\\240'`"'/ /g'
}
#### check() requires two arguments, each the name of a file to be