diff --git a/sh/core/code.awk b/sh/core/code.awk index e274a2b..06e248c 100644 --- a/sh/core/code.awk +++ b/sh/core/code.awk @@ -179,15 +179,17 @@ BEGIN { match_command = 1 } # set - } else if (match($0, re["constant"], m)) { - if (m[1] == target) { - output(m[1], "constant") + } else if (match($0, re["constant"])) { + matched = extract($0, "constant") + if (matched == target) { + output(matched, "constant") } else { reset() } - } else if (match($0, re["variable"], m)) { - if (m[1] == target) { - output(m[1], "variable") + } else if (match($0, re["variable"])) { + matched = extract($0, "variable") + if (matched == target) { + output(matched, "variable") } else { reset() }