mirror of
https://github.com/terraform-docs/terraform-docs.git
synced 2026-03-27 04:48:33 +07:00
fix: Render special chars in variables' default value properly (#284)
* Fix: No longer crashes when there are special chars in a variable default * Do not escape chars everywhere * Cleanup go.mod
This commit is contained in:
@@ -6,7 +6,7 @@ variable "bool-3" {
|
||||
|
||||
variable "bool-2" {
|
||||
description = "It's bool number two."
|
||||
default = false
|
||||
default = false
|
||||
}
|
||||
|
||||
// It's bool number one.
|
||||
@@ -28,6 +28,10 @@ variable "string-1" {
|
||||
default = "bar"
|
||||
}
|
||||
|
||||
variable "string-special-chars" {
|
||||
default = "\\.<>[]{}_-"
|
||||
}
|
||||
|
||||
variable "number-3" {
|
||||
type = number
|
||||
default = "19"
|
||||
@@ -102,7 +106,7 @@ default = [
|
||||
]
|
||||
```
|
||||
EOD
|
||||
default = [
|
||||
default = [
|
||||
"name rack:location"
|
||||
]
|
||||
}
|
||||
@@ -156,7 +160,7 @@ variable "string_default_null" {
|
||||
}
|
||||
|
||||
variable "string_no_default" {
|
||||
type = string
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "number_default_zero" {
|
||||
|
||||
Reference in New Issue
Block a user