Fixed enquoted types in terraform_docs (fixed #52)

This commit is contained in:
Anton Babenko 2019-06-25 14:34:46 +02:00
commit 83629157c2

View file

@ -169,7 +169,12 @@ terraform_docs_awk() {
if (type ~ "object") {
print " type = \"object\""
} else {
print " type = \"" $3 "\""
# legacy quoted types: "string", "list", and "map"
if ($3 ~ /^[[:space:]]*"(.*?)"[[:space:]]*$/) {
print " type = " $3
} else {
print " type = \"" $3 "\""
}
}
}
}