diff options
author | Case Duckworth | 2022-08-13 19:28:19 -0500 |
---|---|---|
committer | Case Duckworth | 2022-08-13 19:28:19 -0500 |
commit | eb643aa982d39316f02a6814fe07562207e188bb (patch) | |
tree | baa868e08a4b6dd0d4b68b4031cb46ce0024dc15 | |
parent | Move template-escaping before raw handling (diff) | |
download | ht-eb643aa982d39316f02a6814fe07562207e188bb.tar.gz ht-eb643aa982d39316f02a6814fe07562207e188bb.zip |
Delete trailing newline from RAW blocks
-rwxr-xr-x | ht.awk | 3 |
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 | } |