diff options
author | Case Duckworth | 2022-08-13 19:30:45 -0500 |
---|---|---|
committer | Case Duckworth | 2022-08-13 19:30:45 -0500 |
commit | 6d506ca7c85c76f7311387dd00095cf05f70aac8 (patch) | |
tree | 3ec0ae1d83558bf2a9074ba2fc1c97b5fc065729 | |
parent | Delete trailing newline from RAW blocks (diff) | |
download | ht-6d506ca7c85c76f7311387dd00095cf05f70aac8.tar.gz ht-6d506ca7c85c76f7311387dd00095cf05f70aac8.zip |
Try to correct RAW trailing newline bug
I'm doing this a bad way (working on remote)
-rwxr-xr-x | ht.awk | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/ht.awk b/ht.awk index 165d40e..68fb558 100755 --- a/ht.awk +++ b/ht.awk | |||
@@ -35,10 +35,7 @@ $0 ~ CONFIG["raw_delim"] { | |||
35 | bufpush(CONFIG["raw_beg"], -1) | 35 | bufpush(CONFIG["raw_beg"], -1) |
36 | } else { | 36 | } else { |
37 | bufpush(CONFIG["raw_end"], -1) | 37 | bufpush(CONFIG["raw_end"], -1) |
38 | if (substr(BUFFER, length(BUFFER)) == "\n") { | 38 | printf "%s", BUFFER |
39 | BUFFER = substr(BUFFER, 1, length(BUFFER) - 1) | ||
40 | } | ||
41 | print BUFFER | ||
42 | BUFFER = "" | 39 | BUFFER = "" |
43 | } | 40 | } |
44 | next | 41 | next |