From 4dca96ca0e0c9cc7ea3f672bcbe6008c85d50d8a Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 24 Aug 2022 23:08:52 -0500 Subject: Fix variable persistence --- ht.awk | 4 ++++ 1 file changed, 4 insertions(+) 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) { if (match(BLOCK_TYPES[bt], "[ \t]*>[ \t]*")) { parent = substr(BLOCK_TYPES[bt], 1, RSTART - 1) child = substr(BLOCK_TYPES[bt], RSTART + RLENGTH) + } else { + parent="" + child="" } if (parent) { split(parent, pa, FS) @@ -215,6 +218,7 @@ function config_initialize() BLOCK_TYPES["##"] = "h2" BLOCK_TYPES["###"] = "h3" BLOCK_TYPES["-"] = "ul>li" + BLOCK_TYPES["%"] = "ol>li" } function config_parse(file) -- cgit 1.4.1-21-gabe81