diff --git a/sh/core/code.awk b/sh/core/code.awk index 6136fb0..3bd8b75 100644 --- a/sh/core/code.awk +++ b/sh/core/code.awk @@ -214,10 +214,10 @@ function parse(string) { # command } else if (match(string, re["command"])) { current_match = "command" - command = strip_first(string, "#/") - ids_put(current_match, command) - commands[command] = "" - doc_append("/ " command) + current_command = strip_first(string, "#/") + ids_put(current_match, current_command) + commands[current_command] = "" + doc_append("/ " current_command) # function } else if (match(string, re["function"])) { @@ -430,7 +430,7 @@ if (action == "doc") { # command } else if (current_match == "command") { - command = "" + current_command = "" # task } else if (current_match == "task") {