diff --git a/sh/core/code.awk b/sh/core/code.awk index f938f7a..3273ce6 100644 --- a/sh/core/code.awk +++ b/sh/core/code.awk @@ -58,7 +58,7 @@ function extract(string, type) { } } -function remove_first(string, target, tmp) { +function strip_first(string, target, tmp) { tmp = string sub(target, "", tmp) return trim(tmp) @@ -125,14 +125,14 @@ function parse(string) { # module if (match(string, RE_MODULE)) { current_match = "module" - module = remove_first(string, "#\\.") + module = strip_first(string, "#\\.") doc_reset() shebang = "" # shebang } else if (match(string, RE_SHEBANG)) { current_match = "shebang" - shebang = remove_first(string, "#!") + shebang = strip_first(string, "#!") # constant } else if (match(string, re["constant"])) { @@ -147,14 +147,14 @@ function parse(string) { # alias } else if (match(string, re["alias"])) { current_match = "alias" - alias = remove_first(string, "#=") + alias = strip_first(string, "#=") aliases[alias] = "" doc_append("= " alias) # command } else if (match(string, re["command"])) { current_match = "command" - command = remove_first(string, "#/") + command = strip_first(string, "#/") commands[command] = "" doc_append("/ " command)