parent
8beb437ce0
commit
02c68d3aed
1 changed files with 5 additions and 2 deletions
|
@ -22,6 +22,9 @@ function extract(string, type) {
|
||||||
} else if (type == "command") {
|
} else if (type == "command") {
|
||||||
split(string, array, "#/")
|
split(string, array, "#/")
|
||||||
return trim(array[2])
|
return trim(array[2])
|
||||||
|
} else if (type == "doc") {
|
||||||
|
split(string, array, "#")
|
||||||
|
return trim(array[2])
|
||||||
} else if (type == "function") {
|
} else if (type == "function") {
|
||||||
split(string, array, "(")
|
split(string, array, "(")
|
||||||
return trim(array[1])
|
return trim(array[1])
|
||||||
|
@ -157,11 +160,11 @@ BEGIN {
|
||||||
# doc
|
# doc
|
||||||
if (match($0, RE_SHEBANG)) {
|
if (match($0, RE_SHEBANG)) {
|
||||||
append("! " extract($0, "shebang"))
|
append("! " extract($0, "shebang"))
|
||||||
} else if (match($0, RE_DOC, m)) {
|
} else if (match($0, RE_DOC)) {
|
||||||
if (f) {
|
if (f) {
|
||||||
append($0)
|
append($0)
|
||||||
} else {
|
} else {
|
||||||
append(m[1])
|
append(extract($0, "doc"))
|
||||||
}
|
}
|
||||||
} else if (match($0, re["alias"], m)) {
|
} else if (match($0, re["alias"], m)) {
|
||||||
append("= " m[1])
|
append("= " m[1])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue