summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2022-08-13 19:28:19 -0500
committerCase Duckworth2022-08-13 19:28:19 -0500
commiteb643aa982d39316f02a6814fe07562207e188bb (patch)
treebaa868e08a4b6dd0d4b68b4031cb46ce0024dc15
parentMove template-escaping before raw handling (diff)
downloadht-eb643aa982d39316f02a6814fe07562207e188bb.tar.gz
ht-eb643aa982d39316f02a6814fe07562207e188bb.zip
Delete trailing newline from RAW blocks
-rwxr-xr-xht.awk3
1 files changed, 3 insertions, 0 deletions
diff --git a/ht.awk b/ht.awk index bf9db1e..165d40e 100755 --- a/ht.awk +++ b/ht.awk
@@ -35,6 +35,9 @@ $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") {
39 BUFFER = substr(BUFFER, 1, length(BUFFER) - 1)
40 }
38 print BUFFER 41 print BUFFER
39 BUFFER = "" 42 BUFFER = ""
40 } 43 }