summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2022-08-24 23:08:52 -0500
committerCase Duckworth2022-08-24 23:08:52 -0500
commit4dca96ca0e0c9cc7ea3f672bcbe6008c85d50d8a (patch)
tree0634ad386c1d0165c24d52048d699134b1daf478
parentEscaping /should/ work now (diff)
downloadht-4dca96ca0e0c9cc7ea3f672bcbe6008c85d50d8a.tar.gz
ht-4dca96ca0e0c9cc7ea3f672bcbe6008c85d50d8a.zip
Fix variable persistence
-rwxr-xr-xht.awk4
1 files changed, 4 insertions, 0 deletions
diff --git a/ht.awk b/ht.awk index 2d96620..45da70e 100755 --- a/ht.awk +++ b/ht.awk
@@ -73,6 +73,9 @@ $0 ~ ("^" COMMENT_DELIM) {
73 if (match(BLOCK_TYPES[bt], "[ \t]*>[ \t]*")) { 73 if (match(BLOCK_TYPES[bt], "[ \t]*>[ \t]*")) {
74 parent = substr(BLOCK_TYPES[bt], 1, RSTART - 1) 74 parent = substr(BLOCK_TYPES[bt], 1, RSTART - 1)
75 child = substr(BLOCK_TYPES[bt], RSTART + RLENGTH) 75 child = substr(BLOCK_TYPES[bt], RSTART + RLENGTH)
76 } else {
77 parent=""
78 child=""
76 } 79 }
77 if (parent) { 80 if (parent) {
78 split(parent, pa, FS) 81 split(parent, pa, FS)
@@ -215,6 +218,7 @@ function config_initialize()
215 BLOCK_TYPES["##"] = "h2" 218 BLOCK_TYPES["##"] = "h2"
216 BLOCK_TYPES["###"] = "h3" 219 BLOCK_TYPES["###"] = "h3"
217 BLOCK_TYPES["-"] = "ul>li" 220 BLOCK_TYPES["-"] = "ul>li"
221 BLOCK_TYPES["%"] = "ol>li"
218} 222}
219 223
220function config_parse(file) 224function config_parse(file)