Simplify .txt handler, and remove double spacing, if lines are too close we should use css to space them.
This commit is contained in:
parent
b3c6def71c
commit
bfd31c5b37
1 changed files with 2 additions and 5 deletions
|
|
@ -83,11 +83,8 @@ fn html_handler {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn txt_handler {
|
fn txt_handler {
|
||||||
echo '<pre>'
|
# Note: Words are not broken, even if they are way beyond 82 chars long
|
||||||
# XXX Insering a blank line between lines in input is good for fortunes.txt, but maybe not for other .txt files
|
echo '<pre>' `{ sed 's/</\</g; s/>/\>/g' < $1 | fmt -l 82 -j } '</pre>'
|
||||||
# XXX Words are not broken, even if they are way beyond 82 chars long
|
|
||||||
cat $1 | sed 's/$/\n/g; s/</\</g; s/>/\>/g' | fmt -l 82 -j
|
|
||||||
echo '</pre>'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn dir_listing_handler {
|
fn dir_listing_handler {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue