diff --git a/sh/core/code.awk b/sh/core/code.awk index 2a801cc..0e5f26a 100644 --- a/sh/core/code.awk +++ b/sh/core/code.awk @@ -101,7 +101,9 @@ BEGIN { unique[extract($0, target)] = "" } } else if (action == "tasks") { + line++ if (match($0, RE_MODULE)) { + line = 1 if (output_tasks) { print "" print output_module @@ -119,9 +121,9 @@ BEGIN { } else { match_task = 1 } - append($0) + append(line ": " $0) } else if (match($0, RE_COMMENT)) { - append($0) + append(line ": " $0) } else { if (match_task) { output_tasks = output_tasks "\n" doc