Normalize line endings
authorCase Duckworth <acdw@acdw.net>
Fri, 22 May 2020 21:11:39 +0000 (16:11 -0500)
committerCase Duckworth <acdw@acdw.net>
Fri, 22 May 2020 21:12:09 +0000 (16:12 -0500)
bollux

diff --git a/bollux b/bollux
index 8026179..e31d37e 100755 (executable)
--- a/bollux
+++ b/bollux
@@ -202,7 +202,8 @@ handle() { # handle URL < RESPONSE
 
 # display the page
 display() { # display <<< STRING
-       cat
+       # normalize line endings to "\n"
+       awk 'BEGIN{RS=""}{gsub("\r\n?","\n");print}'
        # TODO: use less with linking and stuff
        # less -R -p'^=>' +g
        # lesskey: