Skip to content

Commit

Permalink
Fix: Do not double quote TF >= 0.12 legacy quoted types (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
cytopia authored and aknysh committed Jul 13, 2019
1 parent eb48afa commit 6375c34
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bin/terraform-docs.awk
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@
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 "\""
}
}
}
}
Expand Down

0 comments on commit 6375c34

Please sign in to comment.