mirror of
https://github.com/tofuutils/pre-commit-opentofu.git
synced 2025-10-15 17:38:54 +02:00
Fixed enquoted types in terraform_docs (fixed #52)
This commit is contained in:
parent
3147a7c0ee
commit
83629157c2
1 changed files with 6 additions and 1 deletions
|
|
@ -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 "\""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue