Repository: terraform-docs/terraform-docs (2026-02-21T07:14:16Z)

Issue:
Default Markdown table output runs afoul of new markdownlint rule
<!--
Thank you for helping to improve terraform-docs!

Please be sure to search for open issues before raising a new one. We use issues
for bug reports and feature requests. Please note, this template is for feature
requests, not bugs report. For more information, see the Contributing Guidelines
at https://git.io/JtEzg. Please find us at https://slack.terraform-docs.io/ for
questions, support, and discussion.
-->

### What problem are you facing?

The default Markdown table output runs afoul of the new [MD060/table-column-style](https://github.com/DavidAnson/markdownlint/blob/main/doc/md060.md) rule for markdownlint. I would typically look to configure the linter or bypass the rule for cases like this, but I think it might be better for terraform-docs to make a change in this case, The header row having spaces (`| Foo | Bar |`) but the delimiter row lacking them (`|-----|------|`) is inconsistent with typical Markdown table formatting and does not align with the examples in the [documentation](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables#formatting-content-within-your-table) or [specification](https://github.github.com/gfm/#tables-extension-) for the GitHub Flavored Markdown (GFM) table extension.
<!--
Please tell us a little about your use case - it's okay if it's hypothetical!
Leading with this context helps frame the feature request so we can ensure we
implement it sensibly.
--->


### How could terraform-docs help solve your problem?

The default Markdown table output could mirror the examples for the GFM table extension such that instead of

```markdown
| Foo | Bar |
|-----|-----|
```

it instead produces

```markdown
| Foo | Bar |
| --- | --- |
```
<!--
Let us know how you think terraform-docs could help with your use case.
-->



Discussion:

Patch:
diff --git a/docs/reference/asciidoc-document.md b/docs/reference/asciidoc-document.md
index fa78b03a3..b86603e93 100644
--- a/docs/reference/asciidoc-document.md
+++ b/docs/reference/asciidoc-document.md
@@ -96,7 +96,7 @@ generates the following output:
     followed by another line of text.
 
     | Name | Description     |
-    |------|-----------------|
+    | ---- | --------------- |
     | Foo  | Foo description |
     | Bar  | Bar description |
 
diff --git a/docs/reference/asciidoc-table.md b/docs/reference/asciidoc-table.md
index 3898e924a..df618ff5c 100644
--- a/docs/reference/asciidoc-table.md
+++ b/docs/reference/asciidoc-table.md
@@ -96,7 +96,7 @@ generates the following output:
     followed by another line of text.
 
     | Name | Description     |
-    |------|-----------------|
+    | ---- | --------------- |
     | Foo  | Foo description |
     | Bar  | Bar description |
 
diff --git a/docs/reference/json.md b/docs/reference/json.md
index 840dfcd9f..41e1cef88 100644
--- a/docs/reference/json.md
+++ b/docs/reference/json.md
@@ -57,7 +57,7 @@ terraform-docs json --footer-from footer.md ./examples/
 generates the following output:
 
     {
-      "header": "Usage:\n\nExample of 'foo_bar' module in `foo_bar.tf`.\n\n- list item 1\n- list item 2\n\nEven inline **formatting** in _here_ is possible.\nand some [link](https://domain.com/)\n\n* list item 3\n* list item 4\n\n```hcl\nmodule \"foo_bar\" {\n  source = \"github.com/foo/bar\"\n\n  id   = \"1234567890\"\n  name = \"baz\"\n\n  zones = [\"us-east-1\", \"us-west-1\"]\n\n  tags = {\n    Name         = \"baz\"\n    Created-By   = \"first.last@email.com\"\n    Date-Created = \"20180101\"\n  }\n}\n```\n\nHere is some trailing text after code block,\nfollowed by another line of text.\n\n| Name | Description     |\n|------|-----------------|\n| Foo  | Foo description |\n| Bar  | Bar description |",
+      "header": "Usage:\n\nExample of 'foo_bar' module in `foo_bar.tf`.\n\n- list item 1\n- list item 2\n\nEven inline **formatting** in _here_ is possible.\nand some [link](https://domain.com/)\n\n* list item 3\n* list item 4\n\n```hcl\nmodule \"foo_bar\" {\n  source = \"github.com/foo/bar\"\n\n  id   = \"1234567890\"\n  name = \"baz\"\n\n  zones = [\"us-east-1\", \"us-west-1\"]\n\n  tags = {\n    Name         = \"baz\"\n    Created-By   = \"first.last@email.com\"\n    Date-Created = \"20180101\"\n  }\n}\n```\n\nHere is some trailing text after code block,\nfollowed by another line of text.\n\n| Name | Description     |\n| ---- | --------------- |\n| Foo  | Foo description |\n| Bar  | Bar description |",
       "footer": "## This is an example of a footer\n\nIt looks exactly like a header, but is placed at the end of the document",
       "inputs": [
         {
diff --git a/docs/reference/markdown-document.md b/docs/reference/markdown-document.md
index 2c18f3551..74e20b103 100644
--- a/docs/reference/markdown-document.md
+++ b/docs/reference/markdown-document.md
@@ -98,7 +98,7 @@ generates the following output:
     followed by another line of text.
 
     | Name | Description     |
-    |------|-----------------|
+    | ---- | --------------- |
     | Foo  | Foo description |
     | Bar  | Bar description |
 
diff --git a/docs/reference/markdown-table.md b/docs/reference/markdown-table.md
index 64b4ce7fa..92e0ee123 100644
--- a/docs/reference/markdown-table.md
+++ b/docs/reference/markdown-table.md
@@ -98,14 +98,14 @@ generates the following output:
     followed by another line of text.
 
     | Name | Description     |
-    |------|-----------------|
+    | ---- | --------------- |
     | Foo  | Foo description |
     | Bar  | Bar description |
 
     ## Requirements
 
     | Name | Version |
-    |------|---------|
+    | ---- | ------- |
     | <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.12 |
     | <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 2.15.0 |
     | <a name="requirement_foo"></a> [foo](#requirement\_foo) | >= 1.0 |
@@ -114,7 +114,7 @@ generates the following output:
     ## Providers
 
     | Name | Version |
-    |------|---------|
+    | ---- | ------- |
     | <a name="provider_aws"></a> [aws](#provider\_aws) | >= 2.15.0 |
     | <a name="provider_aws.ident"></a> [aws.ident](#provider\_aws.ident) | >= 2.15.0 |
     | <a name="provider_foo"></a> [foo](#provider\_foo) | >= 1.0 |
@@ -124,7 +124,7 @@ generates the following output:
     ## Modules
 
     | Name | Source | Version |
-    |------|--------|---------|
+    | ---- | ------ | ------- |
     | <a name="module_bar"></a> [bar](#module\_bar) | baz | 4.5.6 |
     | <a name="module_baz"></a> [baz](#module\_baz) | baz | 4.5.6 |
     | <a name="module_foo"></a> [foo](#module\_foo) | bar | 1.2.3 |
@@ -133,7 +133,7 @@ generates the following output:
     ## Resources
 
     | Name | Type |
-    |------|------|
+    | ---- | ---- |
     | foo_resource.baz | resource |
     | [null_resource.foo](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
     | [tls_private_key.baz](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key) | resource |
@@ -143,7 +143,7 @@ generates the following output:
     ## Inputs
 
     | Name | Description | Type | Default | Required |
-    |------|-------------|------|---------|:--------:|
+    | ---- | ----------- | ---- | ------- | :------: |
     | <a name="input_bool-1"></a> [bool-1](#input\_bool-1) | It's bool number one. | `bool` | `true` | no |
     | <a name="input_bool-2"></a> [bool-2](#input\_bool-2) | It's bool number two. | `bool` | `false` | no |
     | <a name="input_bool-3"></a> [bool-3](#input\_bool-3) | n/a | `bool` | `true` | no |
@@ -179,7 +179,7 @@ generates the following output:
     ## Outputs
 
     | Name | Description |
-    |------|-------------|
+    | ---- | ----------- |
     | <a name="output_output-0.12"></a> [output-0.12](#output\_output-0.12) | terraform 0.12 only |
     | <a name="output_output-1"></a> [output-1](#output\_output-1) | It's output number one. |
     | <a name="output_output-2"></a> [output-2](#output\_output-2) | It's output number two. |
diff --git a/docs/reference/pretty.md b/docs/reference/pretty.md
index 401feca76..744f26677 100644
--- a/docs/reference/pretty.md
+++ b/docs/reference/pretty.md
@@ -90,7 +90,7 @@ generates the following output:
     followed by another line of text.
 
     | Name | Description     |
-    |------|-----------------|
+    | ---- | --------------- |
     | Foo  | Foo description |
     | Bar  | Bar description |
 
diff --git a/docs/reference/toml.md b/docs/reference/toml.md
index f47c17320..6f25cf0a6 100644
--- a/docs/reference/toml.md
+++ b/docs/reference/toml.md
@@ -55,7 +55,7 @@ terraform-docs toml --footer-from footer.md ./examples/
 
 generates the following output:
 
-    header = "Usage:\n\nExample of 'foo_bar' module in `foo_bar.tf`.\n\n- list item 1\n- list item 2\n\nEven inline **formatting** in _here_ is possible.\nand some [link](https://domain.com/)\n\n* list item 3\n* list item 4\n\n```hcl\nmodule \"foo_bar\" {\n  source = \"github.com/foo/bar\"\n\n  id   = \"1234567890\"\n  name = \"baz\"\n\n  zones = [\"us-east-1\", \"us-west-1\"]\n\n  tags = {\n    Name         = \"baz\"\n    Created-By   = \"first.last@email.com\"\n    Date-Created = \"20180101\"\n  }\n}\n```\n\nHere is some trailing text after code block,\nfollowed by another line of text.\n\n| Name | Description     |\n|------|-----------------|\n| Foo  | Foo description |\n| Bar  | Bar description |"
+    header = "Usage:\n\nExample of 'foo_bar' module in `foo_bar.tf`.\n\n- list item 1\n- list item 2\n\nEven inline **formatting** in _here_ is possible.\nand some [link](https://domain.com/)\n\n* list item 3\n* list item 4\n\n```hcl\nmodule \"foo_bar\" {\n  source = \"github.com/foo/bar\"\n\n  id   = \"1234567890\"\n  name = \"baz\"\n\n  zones = [\"us-east-1\", \"us-west-1\"]\n\n  tags = {\n    Name         = \"baz\"\n    Created-By   = \"first.last@email.com\"\n    Date-Created = \"20180101\"\n  }\n}\n```\n\nHere is some trailing text after code block,\nfollowed by another line of text.\n\n| Name | Description     |\n| ---- | --------------- |\n| Foo  | Foo description |\n| Bar  | Bar description |"
     footer = "## This is an example of a footer\n\nIt looks exactly like a header, but is placed at the end of the document"
 
     [[inputs]]
diff --git a/docs/reference/xml.md b/docs/reference/xml.md
index f89869698..fa671917b 100644
--- a/docs/reference/xml.md
+++ b/docs/reference/xml.md
@@ -56,7 +56,7 @@ terraform-docs xml --footer-from footer.md ./examples/
 generates the following output:
 
     <module>
-      <header>Usage:&#xA;&#xA;Example of &#39;foo_bar&#39; module in `foo_bar.tf`.&#xA;&#xA;- list item 1&#xA;- list item 2&#xA;&#xA;Even inline **formatting** in _here_ is possible.&#xA;and some [link](https://domain.com/)&#xA;&#xA;* list item 3&#xA;* list item 4&#xA;&#xA;```hcl&#xA;module &#34;foo_bar&#34; {&#xA;  source = &#34;github.com/foo/bar&#34;&#xA;&#xA;  id   = &#34;1234567890&#34;&#xA;  name = &#34;baz&#34;&#xA;&#xA;  zones = [&#34;us-east-1&#34;, &#34;us-west-1&#34;]&#xA;&#xA;  tags = {&#xA;    Name         = &#34;baz&#34;&#xA;    Created-By   = &#34;first.last@email.com&#34;&#xA;    Date-Created = &#34;20180101&#34;&#xA;  }&#xA;}&#xA;```&#xA;&#xA;Here is some trailing text after code block,&#xA;followed by another line of text.&#xA;&#xA;| Name | Description     |&#xA;|------|-----------------|&#xA;| Foo  | Foo description |&#xA;| Bar  | Bar description |</header>
+      <header>Usage:&#xA;&#xA;Example of &#39;foo_bar&#39; module in `foo_bar.tf`.&#xA;&#xA;- list item 1&#xA;- list item 2&#xA;&#xA;Even inline **formatting** in _here_ is possible.&#xA;and some [link](https://domain.com/)&#xA;&#xA;* list item 3&#xA;* list item 4&#xA;&#xA;```hcl&#xA;module &#34;foo_bar&#34; {&#xA;  source = &#34;github.com/foo/bar&#34;&#xA;&#xA;  id   = &#34;1234567890&#34;&#xA;  name = &#34;baz&#34;&#xA;&#xA;  zones = [&#34;us-east-1&#34;, &#34;us-west-1&#34;]&#xA;&#xA;  tags = {&#xA;    Name         = &#34;baz&#34;&#xA;    Created-By   = &#34;first.last@email.com&#34;&#xA;    Date-Created = &#34;20180101&#34;&#xA;  }&#xA;}&#xA;```&#xA;&#xA;Here is some trailing text after code block,&#xA;followed by another line of text.&#xA;&#xA;| Name | Description     |&#xA;| ---- | --------------- |&#xA;| Foo  | Foo description |&#xA;| Bar  | Bar description |</header>
       <footer>## This is an example of a footer&#xA;&#xA;It looks exactly like a header, but is placed at the end of the document</footer>
       <inputs>
         <input>
diff --git a/docs/reference/yaml.md b/docs/reference/yaml.md
index ff468e63a..59e896bae 100644
--- a/docs/reference/yaml.md
+++ b/docs/reference/yaml.md
@@ -90,7 +90,7 @@ generates the following output:
       followed by another line of text.
 
       | Name | Description     |
-      |------|-----------------|
+      | ---- | --------------- |
       | Foo  | Foo description |
       | Bar  | Bar description |
     footer: |-
diff --git a/examples/main.tf b/examples/main.tf
index a800ffa46..40c4ef3cc 100644
--- a/examples/main.tf
+++ b/examples/main.tf
@@ -33,7 +33,7 @@
  * followed by another line of text.
  *
  * | Name | Description     |
- * |------|-----------------|
+ * | ---- | --------------- |
  * | Foo  | Foo description |
  * | Bar  | Bar description |
  */
diff --git a/format/templates/markdown_table_inputs.tmpl b/format/templates/markdown_table_inputs.tmpl
index fb7892318..89cac2f77 100644
--- a/format/templates/markdown_table_inputs.tmpl
+++ b/format/templates/markdown_table_inputs.tmpl
@@ -12,10 +12,10 @@
         {{- if .Config.Settings.Type }} Type |{{ end }}
         {{- if .Config.Settings.Default }} Default |{{ end }}
         {{- if .Config.Settings.Required }} Required |{{ end }}
-        |------|-------------|
-        {{- if .Config.Settings.Type }}------|{{ end }}
-        {{- if .Config.Settings.Default }}---------|{{ end }}
-        {{- if .Config.Settings.Required }}:--------:|{{ end }}
+        | ---- | ----------- |
+        {{- if .Config.Settings.Type }} ---- |{{ end }}
+        {{- if .Config.Settings.Default }} ------- |{{ end }}
+        {{- if .Config.Settings.Required }} :------: |{{ end }}
         {{- range .Module.Inputs }}
             | {{ anchorNameMarkdown "input" .Name }} | {{ tostring .Description | sanitizeMarkdownTbl }} |
             {{- if $.Config.Settings.Type -}}
diff --git a/format/templates/markdown_table_modules.tmpl b/format/templates/markdown_table_modules.tmpl
index 891778c2e..488d1d6af 100644
--- a/format/templates/markdown_table_modules.tmpl
+++ b/format/templates/markdown_table_modules.tmpl
@@ -9,7 +9,7 @@
         {{- indent 0 "#" }} Modules
 
         | Name | Source | Version |
-        |------|--------|---------|
+        | ---- | ------ | ------- |
         {{- range .Module.ModuleCalls }}
             | {{ anchorNameMarkdown "module" .Name }} | {{ .Source }} | {{ .Version | default "n/a" }} |
         {{- end }}
diff --git a/format/templates/markdown_table_outputs.tmpl b/format/templates/markdown_table_outputs.tmpl
index dd44e0803..8e2ea78e0 100644
--- a/format/templates/markdown_table_outputs.tmpl
+++ b/format/templates/markdown_table_outputs.tmpl
@@ -9,7 +9,7 @@
         {{- indent 0 "#" }} Outputs
 
         | Name | Description |{{ if .Config.OutputValues.Enabled }} Value |{{ if $.Config.Settings.Sensitive }} Sensitive |{{ end }}{{ end }}
-        |------|-------------|{{ if .Config.OutputValues.Enabled }}-------|{{ if $.Config.Settings.Sensitive }}:---------:|{{ end }}{{ end }}
+        | ---- | ----------- |{{ if .Config.OutputValues.Enabled }} ----- |{{ if $.Config.Settings.Sensitive }} :-------: |{{ end }}{{ end }}
         {{- range .Module.Outputs }}
             | {{ anchorNameMarkdown "output" .Name }} | {{ tostring .Description | sanitizeMarkdownTbl }} |
             {{- if $.Config.OutputValues.Enabled -}}
diff --git a/format/templates/markdown_table_providers.tmpl b/format/templates/markdown_table_providers.tmpl
index 35a3d04ed..f9c7d47e5 100644
--- a/format/templates/markdown_table_providers.tmpl
+++ b/format/templates/markdown_table_providers.tmpl
@@ -9,7 +9,7 @@
         {{- indent 0 "#" }} Providers
 
         | Name | Version |
-        |------|---------|
+        | ---- | ------- |
         {{- range .Module.Providers }}
             | {{ anchorNameMarkdown "provider" .FullName }} | {{ tostring .Version | default "n/a" }} |
         {{- end }}
diff --git a/format/templates/markdown_table_requirements.tmpl b/format/templates/markdown_table_requirements.tmpl
index b77dbd2d9..6d8cb8513 100644
--- a/format/templates/markdown_table_requirements.tmpl
+++ b/format/templates/markdown_table_requirements.tmpl
@@ -9,7 +9,7 @@
         {{- indent 0 "#" }} Requirements
 
         | Name | Version |
-        |------|---------|
+        | ---- | ------- |
         {{- range .Module.Requirements }}
             | {{ anchorNameMarkdown "requirement" .Name }} | {{ tostring .Version | default "n/a" }} |
         {{- end }}
diff --git a/format/templates/markdown_table_resources.tmpl b/format/templates/markdown_table_resources.tmpl
index eb6b131a0..d096348eb 100644
--- a/format/templates/markdown_table_resources.tmpl
+++ b/format/templates/markdown_table_resources.tmpl
@@ -9,7 +9,7 @@
         {{- indent 0 "#" }} Resources
 
         | Name | Type |
-        |------|------|
+        | ---- | ---- |
         {{- range .Module.Resources }}
             {{- $isResource := and $.Config.Sections.Resources ( eq "resource" (printf "%s" .GetMode)) }}
             {{- $isDataResource := and $.Config.Sections.DataSources ( eq "data source" (printf "%s" .GetMode)) }}


Test patch:
diff --git a/format/testdata/asciidoc/document-Base.golden b/format/testdata/asciidoc/document-Base.golden
index 035326c0c..6971b0b41 100644
--- a/format/testdata/asciidoc/document-Base.golden
+++ b/format/testdata/asciidoc/document-Base.golden
@@ -32,7 +32,7 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
 
diff --git a/format/testdata/asciidoc/document-IndentationOfFour.golden b/format/testdata/asciidoc/document-IndentationOfFour.golden
index 2fef83f54..7880b7691 100644
--- a/format/testdata/asciidoc/document-IndentationOfFour.golden
+++ b/format/testdata/asciidoc/document-IndentationOfFour.golden
@@ -32,7 +32,7 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
 
diff --git a/format/testdata/asciidoc/document-OnlyHeader.golden b/format/testdata/asciidoc/document-OnlyHeader.golden
index 303e2018e..a723703b4 100644
--- a/format/testdata/asciidoc/document-OnlyHeader.golden
+++ b/format/testdata/asciidoc/document-OnlyHeader.golden
@@ -32,6 +32,6 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
\ No newline at end of file
diff --git a/format/testdata/asciidoc/document-WithAnchor.golden b/format/testdata/asciidoc/document-WithAnchor.golden
index 1982da434..aab34e30f 100644
--- a/format/testdata/asciidoc/document-WithAnchor.golden
+++ b/format/testdata/asciidoc/document-WithAnchor.golden
@@ -32,7 +32,7 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
 
diff --git a/format/testdata/asciidoc/document-WithRequired.golden b/format/testdata/asciidoc/document-WithRequired.golden
index ec79e65e0..a36eb73df 100644
--- a/format/testdata/asciidoc/document-WithRequired.golden
+++ b/format/testdata/asciidoc/document-WithRequired.golden
@@ -32,7 +32,7 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
 
diff --git a/format/testdata/asciidoc/table-Base.golden b/format/testdata/asciidoc/table-Base.golden
index 69e087131..1e26764d7 100644
--- a/format/testdata/asciidoc/table-Base.golden
+++ b/format/testdata/asciidoc/table-Base.golden
@@ -32,7 +32,7 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
 
diff --git a/format/testdata/asciidoc/table-IndentationOfFour.golden b/format/testdata/asciidoc/table-IndentationOfFour.golden
index 5f6936b28..a4678d00d 100644
--- a/format/testdata/asciidoc/table-IndentationOfFour.golden
+++ b/format/testdata/asciidoc/table-IndentationOfFour.golden
@@ -32,7 +32,7 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
 
diff --git a/format/testdata/asciidoc/table-OnlyHeader.golden b/format/testdata/asciidoc/table-OnlyHeader.golden
index 303e2018e..a723703b4 100644
--- a/format/testdata/asciidoc/table-OnlyHeader.golden
+++ b/format/testdata/asciidoc/table-OnlyHeader.golden
@@ -32,6 +32,6 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
\ No newline at end of file
diff --git a/format/testdata/asciidoc/table-WithAnchor.golden b/format/testdata/asciidoc/table-WithAnchor.golden
index 6bcb2e30f..3ed2a001e 100644
--- a/format/testdata/asciidoc/table-WithAnchor.golden
+++ b/format/testdata/asciidoc/table-WithAnchor.golden
@@ -32,7 +32,7 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
 
diff --git a/format/testdata/asciidoc/table-WithRequired.golden b/format/testdata/asciidoc/table-WithRequired.golden
index 6f6e8ef7d..f20f808b2 100644
--- a/format/testdata/asciidoc/table-WithRequired.golden
+++ b/format/testdata/asciidoc/table-WithRequired.golden
@@ -32,7 +32,7 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
 
diff --git a/format/testdata/json/json-Base.golden b/format/testdata/json/json-Base.golden
index 516899499..f9b3bb4aa 100644
--- a/format/testdata/json/json-Base.golden
+++ b/format/testdata/json/json-Base.golden
@@ -1,5 +1,5 @@
 {
-  "header": "Usage:\n\nExample of 'foo_bar' module in `foo_bar.tf`.\n\n- list item 1\n- list item 2\n\nEven inline **formatting** in _here_ is possible.\nand some [link](https://domain.com/)\n\n* list item 3\n* list item 4\n\n```hcl\nmodule \"foo_bar\" {\n  source = \"github.com/foo/bar\"\n\n  id   = \"1234567890\"\n  name = \"baz\"\n\n  zones = [\"us-east-1\", \"us-west-1\"]\n\n  tags = {\n    Name         = \"baz\"\n    Created-By   = \"first.last@email.com\"\n    Date-Created = \"20180101\"\n  }\n}\n```\n\nHere is some trailing text after code block,\nfollowed by another line of text.\n\n| Name | Description     |\n|------|-----------------|\n| Foo  | Foo description |\n| Bar  | Bar description |",
+  "header": "Usage:\n\nExample of 'foo_bar' module in `foo_bar.tf`.\n\n- list item 1\n- list item 2\n\nEven inline **formatting** in _here_ is possible.\nand some [link](https://domain.com/)\n\n* list item 3\n* list item 4\n\n```hcl\nmodule \"foo_bar\" {\n  source = \"github.com/foo/bar\"\n\n  id   = \"1234567890\"\n  name = \"baz\"\n\n  zones = [\"us-east-1\", \"us-west-1\"]\n\n  tags = {\n    Name         = \"baz\"\n    Created-By   = \"first.last@email.com\"\n    Date-Created = \"20180101\"\n  }\n}\n```\n\nHere is some trailing text after code block,\nfollowed by another line of text.\n\n| Name | Description     |\n| ---- | --------------- |\n| Foo  | Foo description |\n| Bar  | Bar description |",
   "footer": "## This is an example of a footer\n\nIt looks exactly like a header, but is placed at the end of the document",
   "inputs": [
     {
diff --git a/format/testdata/json/json-EscapeCharacters.golden b/format/testdata/json/json-EscapeCharacters.golden
index 99135f935..ccb850918 100644
--- a/format/testdata/json/json-EscapeCharacters.golden
+++ b/format/testdata/json/json-EscapeCharacters.golden
@@ -1,5 +1,5 @@
 {
-  "header": "Usage:\n\nExample of 'foo_bar' module in `foo_bar.tf`.\n\n- list item 1\n- list item 2\n\nEven inline **formatting** in _here_ is possible.\nand some [link](https://domain.com/)\n\n* list item 3\n* list item 4\n\n```hcl\nmodule \"foo_bar\" {\n  source = \"github.com/foo/bar\"\n\n  id   = \"1234567890\"\n  name = \"baz\"\n\n  zones = [\"us-east-1\", \"us-west-1\"]\n\n  tags = {\n    Name         = \"baz\"\n    Created-By   = \"first.last@email.com\"\n    Date-Created = \"20180101\"\n  }\n}\n```\n\nHere is some trailing text after code block,\nfollowed by another line of text.\n\n| Name | Description     |\n|------|-----------------|\n| Foo  | Foo description |\n| Bar  | Bar description |",
+  "header": "Usage:\n\nExample of 'foo_bar' module in `foo_bar.tf`.\n\n- list item 1\n- list item 2\n\nEven inline **formatting** in _here_ is possible.\nand some [link](https://domain.com/)\n\n* list item 3\n* list item 4\n\n```hcl\nmodule \"foo_bar\" {\n  source = \"github.com/foo/bar\"\n\n  id   = \"1234567890\"\n  name = \"baz\"\n\n  zones = [\"us-east-1\", \"us-west-1\"]\n\n  tags = {\n    Name         = \"baz\"\n    Created-By   = \"first.last@email.com\"\n    Date-Created = \"20180101\"\n  }\n}\n```\n\nHere is some trailing text after code block,\nfollowed by another line of text.\n\n| Name | Description     |\n| ---- | --------------- |\n| Foo  | Foo description |\n| Bar  | Bar description |",
   "footer": "## This is an example of a footer\n\nIt looks exactly like a header, but is placed at the end of the document",
   "inputs": [
     {
diff --git a/format/testdata/json/json-OnlyHeader.golden b/format/testdata/json/json-OnlyHeader.golden
index b6655c42b..490d5a68e 100644
--- a/format/testdata/json/json-OnlyHeader.golden
+++ b/format/testdata/json/json-OnlyHeader.golden
@@ -1,5 +1,5 @@
 {
-  "header": "Usage:\n\nExample of 'foo_bar' module in `foo_bar.tf`.\n\n- list item 1\n- list item 2\n\nEven inline **formatting** in _here_ is possible.\nand some [link](https://domain.com/)\n\n* list item 3\n* list item 4\n\n```hcl\nmodule \"foo_bar\" {\n  source = \"github.com/foo/bar\"\n\n  id   = \"1234567890\"\n  name = \"baz\"\n\n  zones = [\"us-east-1\", \"us-west-1\"]\n\n  tags = {\n    Name         = \"baz\"\n    Created-By   = \"first.last@email.com\"\n    Date-Created = \"20180101\"\n  }\n}\n```\n\nHere is some trailing text after code block,\nfollowed by another line of text.\n\n| Name | Description     |\n|------|-----------------|\n| Foo  | Foo description |\n| Bar  | Bar description |",
+  "header": "Usage:\n\nExample of 'foo_bar' module in `foo_bar.tf`.\n\n- list item 1\n- list item 2\n\nEven inline **formatting** in _here_ is possible.\nand some [link](https://domain.com/)\n\n* list item 3\n* list item 4\n\n```hcl\nmodule \"foo_bar\" {\n  source = \"github.com/foo/bar\"\n\n  id   = \"1234567890\"\n  name = \"baz\"\n\n  zones = [\"us-east-1\", \"us-west-1\"]\n\n  tags = {\n    Name         = \"baz\"\n    Created-By   = \"first.last@email.com\"\n    Date-Created = \"20180101\"\n  }\n}\n```\n\nHere is some trailing text after code block,\nfollowed by another line of text.\n\n| Name | Description     |\n| ---- | --------------- |\n| Foo  | Foo description |\n| Bar  | Bar description |",
   "footer": "",
   "inputs": [],
   "modules": [],
diff --git a/format/testdata/markdown/document-Base.golden b/format/testdata/markdown/document-Base.golden
index 0d5801c28..39b3e40de 100644
--- a/format/testdata/markdown/document-Base.golden
+++ b/format/testdata/markdown/document-Base.golden
@@ -32,7 +32,7 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
 
diff --git a/format/testdata/markdown/document-EscapeCharacters.golden b/format/testdata/markdown/document-EscapeCharacters.golden
index 1203ff24a..aac12105d 100644
--- a/format/testdata/markdown/document-EscapeCharacters.golden
+++ b/format/testdata/markdown/document-EscapeCharacters.golden
@@ -32,7 +32,7 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
 
diff --git a/format/testdata/markdown/document-IndentationOfFour.golden b/format/testdata/markdown/document-IndentationOfFour.golden
index f09c34019..bb04a09d7 100644
--- a/format/testdata/markdown/document-IndentationOfFour.golden
+++ b/format/testdata/markdown/document-IndentationOfFour.golden
@@ -32,7 +32,7 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
 
diff --git a/format/testdata/markdown/document-OnlyHeader.golden b/format/testdata/markdown/document-OnlyHeader.golden
index 303e2018e..a723703b4 100644
--- a/format/testdata/markdown/document-OnlyHeader.golden
+++ b/format/testdata/markdown/document-OnlyHeader.golden
@@ -32,6 +32,6 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
\ No newline at end of file
diff --git a/format/testdata/markdown/document-WithAnchor.golden b/format/testdata/markdown/document-WithAnchor.golden
index da9ac435f..7833073a1 100644
--- a/format/testdata/markdown/document-WithAnchor.golden
+++ b/format/testdata/markdown/document-WithAnchor.golden
@@ -32,7 +32,7 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
 
diff --git a/format/testdata/markdown/document-WithRequired.golden b/format/testdata/markdown/document-WithRequired.golden
index 555b376e0..c5b3cda46 100644
--- a/format/testdata/markdown/document-WithRequired.golden
+++ b/format/testdata/markdown/document-WithRequired.golden
@@ -32,7 +32,7 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
 
diff --git a/format/testdata/markdown/document-WithoutHTML.golden b/format/testdata/markdown/document-WithoutHTML.golden
index 0d5801c28..39b3e40de 100644
--- a/format/testdata/markdown/document-WithoutHTML.golden
+++ b/format/testdata/markdown/document-WithoutHTML.golden
@@ -32,7 +32,7 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
 
diff --git a/format/testdata/markdown/document-WithoutHTMLWithAnchor.golden b/format/testdata/markdown/document-WithoutHTMLWithAnchor.golden
index da9ac435f..7833073a1 100644
--- a/format/testdata/markdown/document-WithoutHTMLWithAnchor.golden
+++ b/format/testdata/markdown/document-WithoutHTMLWithAnchor.golden
@@ -32,7 +32,7 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
 
diff --git a/format/testdata/markdown/table-Base.golden b/format/testdata/markdown/table-Base.golden
index 24333eeff..0f52015a5 100644
--- a/format/testdata/markdown/table-Base.golden
+++ b/format/testdata/markdown/table-Base.golden
@@ -32,14 +32,14 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
 
 ## Requirements
 
 | Name | Version |
-|------|---------|
+| ---- | ------- |
 | terraform | >= 0.12 |
 | aws | >= 2.15.0 |
 | foo | >= 1.0 |
@@ -48,7 +48,7 @@ followed by another line of text.
 ## Providers
 
 | Name | Version |
-|------|---------|
+| ---- | ------- |
 | tls | n/a |
 | foo | >= 1.0 |
 | aws | >= 2.15.0 |
@@ -58,7 +58,7 @@ followed by another line of text.
 ## Modules
 
 | Name | Source | Version |
-|------|--------|---------|
+| ---- | ------ | ------- |
 | bar | baz | 4.5.6 |
 | foo | bar | 1.2.3 |
 | baz | baz | 4.5.6 |
@@ -67,7 +67,7 @@ followed by another line of text.
 ## Resources
 
 | Name | Type |
-|------|------|
+| ---- | ---- |
 | foo_resource.baz | resource |
 | [null_resource.foo](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
 | [tls_private_key.baz](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key) | resource |
@@ -77,7 +77,7 @@ followed by another line of text.
 ## Inputs
 
 | Name | Description | Type | Default |
-|------|-------------|------|---------|
+| ---- | ----------- | ---- | ------- |
 | unquoted | n/a | `any` | n/a |
 | bool-3 | n/a | `bool` | `true` |
 | bool-2 | It's bool number two. | `bool` | `false` |
@@ -113,7 +113,7 @@ followed by another line of text.
 ## Outputs
 
 | Name | Description |
-|------|-------------|
+| ---- | ----------- |
 | unquoted | It's unquoted output. |
 | output-2 | It's output number two. |
 | output-1 | It's output number one. |
diff --git a/format/testdata/markdown/table-EscapeCharacters.golden b/format/testdata/markdown/table-EscapeCharacters.golden
index b8e6b01fe..66659af60 100644
--- a/format/testdata/markdown/table-EscapeCharacters.golden
+++ b/format/testdata/markdown/table-EscapeCharacters.golden
@@ -32,14 +32,14 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
 
 ## Requirements
 
 | Name | Version |
-|------|---------|
+| ---- | ------- |
 | terraform | >= 0.12 |
 | aws | >= 2.15.0 |
 | foo | >= 1.0 |
@@ -48,7 +48,7 @@ followed by another line of text.
 ## Providers
 
 | Name | Version |
-|------|---------|
+| ---- | ------- |
 | tls | n/a |
 | foo | >= 1.0 |
 | aws | >= 2.15.0 |
@@ -58,7 +58,7 @@ followed by another line of text.
 ## Modules
 
 | Name | Source | Version |
-|------|--------|---------|
+| ---- | ------ | ------- |
 | bar | baz | 4.5.6 |
 | foo | bar | 1.2.3 |
 | baz | baz | 4.5.6 |
@@ -67,7 +67,7 @@ followed by another line of text.
 ## Resources
 
 | Name | Type |
-|------|------|
+| ---- | ---- |
 | foo_resource.baz | resource |
 | [null_resource.foo](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
 | [tls_private_key.baz](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key) | resource |
@@ -77,7 +77,7 @@ followed by another line of text.
 ## Inputs
 
 | Name | Description | Type | Default |
-|------|-------------|------|---------|
+| ---- | ----------- | ---- | ------- |
 | unquoted | n/a | `any` | n/a |
 | bool-3 | n/a | `bool` | `true` |
 | bool-2 | It's bool number two. | `bool` | `false` |
@@ -113,7 +113,7 @@ followed by another line of text.
 ## Outputs
 
 | Name | Description |
-|------|-------------|
+| ---- | ----------- |
 | unquoted | It's unquoted output. |
 | output-2 | It's output number two. |
 | output-1 | It's output number one. |
diff --git a/format/testdata/markdown/table-IndentationOfFour.golden b/format/testdata/markdown/table-IndentationOfFour.golden
index 96e9c4f19..9154469cf 100644
--- a/format/testdata/markdown/table-IndentationOfFour.golden
+++ b/format/testdata/markdown/table-IndentationOfFour.golden
@@ -32,14 +32,14 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
 
 #### Requirements
 
 | Name | Version |
-|------|---------|
+| ---- | ------- |
 | terraform | >= 0.12 |
 | aws | >= 2.15.0 |
 | foo | >= 1.0 |
@@ -48,7 +48,7 @@ followed by another line of text.
 #### Providers
 
 | Name | Version |
-|------|---------|
+| ---- | ------- |
 | tls | n/a |
 | foo | >= 1.0 |
 | aws | >= 2.15.0 |
@@ -58,7 +58,7 @@ followed by another line of text.
 #### Modules
 
 | Name | Source | Version |
-|------|--------|---------|
+| ---- | ------ | ------- |
 | bar | baz | 4.5.6 |
 | foo | bar | 1.2.3 |
 | baz | baz | 4.5.6 |
@@ -67,7 +67,7 @@ followed by another line of text.
 #### Resources
 
 | Name | Type |
-|------|------|
+| ---- | ---- |
 | foo_resource.baz | resource |
 | [null_resource.foo](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
 | [tls_private_key.baz](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key) | resource |
@@ -77,7 +77,7 @@ followed by another line of text.
 #### Inputs
 
 | Name | Description | Type | Default |
-|------|-------------|------|---------|
+| ---- | ----------- | ---- | ------- |
 | unquoted | n/a | `any` | n/a |
 | bool-3 | n/a | `bool` | `true` |
 | bool-2 | It's bool number two. | `bool` | `false` |
@@ -113,7 +113,7 @@ followed by another line of text.
 #### Outputs
 
 | Name | Description |
-|------|-------------|
+| ---- | ----------- |
 | unquoted | It's unquoted output. |
 | output-2 | It's output number two. |
 | output-1 | It's output number one. |
diff --git a/format/testdata/markdown/table-OnlyDataSources.golden b/format/testdata/markdown/table-OnlyDataSources.golden
index c648e5b5d..f34a2e0d6 100644
--- a/format/testdata/markdown/table-OnlyDataSources.golden
+++ b/format/testdata/markdown/table-OnlyDataSources.golden
@@ -1,6 +1,6 @@
 ## Resources
 
 | Name | Type |
-|------|------|
+| ---- | ---- |
 | [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
 | [aws_caller_identity.ident](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
\ No newline at end of file
diff --git a/format/testdata/markdown/table-OnlyHeader.golden b/format/testdata/markdown/table-OnlyHeader.golden
index 303e2018e..a723703b4 100644
--- a/format/testdata/markdown/table-OnlyHeader.golden
+++ b/format/testdata/markdown/table-OnlyHeader.golden
@@ -32,6 +32,6 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
\ No newline at end of file
diff --git a/format/testdata/markdown/table-OnlyInputs.golden b/format/testdata/markdown/table-OnlyInputs.golden
index 18338df93..f729fa16f 100644
--- a/format/testdata/markdown/table-OnlyInputs.golden
+++ b/format/testdata/markdown/table-OnlyInputs.golden
@@ -1,7 +1,7 @@
 ## Inputs
 
 | Name | Description | Type | Default |
-|------|-------------|------|---------|
+| ---- | ----------- | ---- | ------- |
 | unquoted | n/a | `any` | n/a |
 | bool-3 | n/a | `bool` | `true` |
 | bool-2 | It's bool number two. | `bool` | `false` |
diff --git a/format/testdata/markdown/table-OnlyModulecalls.golden b/format/testdata/markdown/table-OnlyModulecalls.golden
index 233c728e1..1c04997ed 100644
--- a/format/testdata/markdown/table-OnlyModulecalls.golden
+++ b/format/testdata/markdown/table-OnlyModulecalls.golden
@@ -1,7 +1,7 @@
 ## Modules
 
 | Name | Source | Version |
-|------|--------|---------|
+| ---- | ------ | ------- |
 | bar | baz | 4.5.6 |
 | foo | bar | 1.2.3 |
 | baz | baz | 4.5.6 |
diff --git a/format/testdata/markdown/table-OnlyOutputs.golden b/format/testdata/markdown/table-OnlyOutputs.golden
index 9a62f6306..2faa258b3 100644
--- a/format/testdata/markdown/table-OnlyOutputs.golden
+++ b/format/testdata/markdown/table-OnlyOutputs.golden
@@ -1,7 +1,7 @@
 ## Outputs
 
 | Name | Description |
-|------|-------------|
+| ---- | ----------- |
 | unquoted | It's unquoted output. |
 | output-2 | It's output number two. |
 | output-1 | It's output number one. |
diff --git a/format/testdata/markdown/table-OnlyProviders.golden b/format/testdata/markdown/table-OnlyProviders.golden
index 10b50c606..49e4c33ff 100644
--- a/format/testdata/markdown/table-OnlyProviders.golden
+++ b/format/testdata/markdown/table-OnlyProviders.golden
@@ -1,7 +1,7 @@
 ## Providers
 
 | Name | Version |
-|------|---------|
+| ---- | ------- |
 | tls | n/a |
 | foo | >= 1.0 |
 | aws | >= 2.15.0 |
diff --git a/format/testdata/markdown/table-OnlyRequirements.golden b/format/testdata/markdown/table-OnlyRequirements.golden
index f3742cb9d..6a84c3e24 100644
--- a/format/testdata/markdown/table-OnlyRequirements.golden
+++ b/format/testdata/markdown/table-OnlyRequirements.golden
@@ -1,7 +1,7 @@
 ## Requirements
 
 | Name | Version |
-|------|---------|
+| ---- | ------- |
 | terraform | >= 0.12 |
 | aws | >= 2.15.0 |
 | foo | >= 1.0 |
diff --git a/format/testdata/markdown/table-OnlyResources.golden b/format/testdata/markdown/table-OnlyResources.golden
index dc1d5ffd1..a3f7eac3a 100644
--- a/format/testdata/markdown/table-OnlyResources.golden
+++ b/format/testdata/markdown/table-OnlyResources.golden
@@ -1,7 +1,7 @@
 ## Resources
 
 | Name | Type |
-|------|------|
+| ---- | ---- |
 | foo_resource.baz | resource |
 | [null_resource.foo](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
 | [tls_private_key.baz](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key) | resource |
\ No newline at end of file
diff --git a/format/testdata/markdown/table-OutputValues.golden b/format/testdata/markdown/table-OutputValues.golden
index b0a25b376..37f68def2 100644
--- a/format/testdata/markdown/table-OutputValues.golden
+++ b/format/testdata/markdown/table-OutputValues.golden
@@ -1,7 +1,7 @@
 ## Outputs
 
 | Name | Description | Value | Sensitive |
-|------|-------------|-------|:---------:|
+| ---- | ----------- | ----- | :-------: |
 | unquoted | It's unquoted output. | <pre>{<br/>  "leon": "cat"<br/>}</pre> | no |
 | output-2 | It's output number two. | <pre>[<br/>  "jack",<br/>  "lola"<br/>]</pre> | no |
 | output-1 | It's output number one. | `1` | no |
diff --git a/format/testdata/markdown/table-OutputValuesNoSensitivity.golden b/format/testdata/markdown/table-OutputValuesNoSensitivity.golden
index 0e6221ca1..fe6f77b51 100644
--- a/format/testdata/markdown/table-OutputValuesNoSensitivity.golden
+++ b/format/testdata/markdown/table-OutputValuesNoSensitivity.golden
@@ -1,7 +1,7 @@
 ## Outputs
 
 | Name | Description | Value |
-|------|-------------|-------|
+| ---- | ----------- | ----- |
 | unquoted | It's unquoted output. | <pre>{<br/>  "leon": "cat"<br/>}</pre> |
 | output-2 | It's output number two. | <pre>[<br/>  "jack",<br/>  "lola"<br/>]</pre> |
 | output-1 | It's output number one. | `1` |
diff --git a/format/testdata/markdown/table-WithAnchor.golden b/format/testdata/markdown/table-WithAnchor.golden
index 6a202b2c2..55825b6be 100644
--- a/format/testdata/markdown/table-WithAnchor.golden
+++ b/format/testdata/markdown/table-WithAnchor.golden
@@ -32,14 +32,14 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
 
 ## Requirements
 
 | Name | Version |
-|------|---------|
+| ---- | ------- |
 | <a name="requirement_terraform"></a> [terraform](#requirement_terraform) | >= 0.12 |
 | <a name="requirement_aws"></a> [aws](#requirement_aws) | >= 2.15.0 |
 | <a name="requirement_foo"></a> [foo](#requirement_foo) | >= 1.0 |
@@ -48,7 +48,7 @@ followed by another line of text.
 ## Providers
 
 | Name | Version |
-|------|---------|
+| ---- | ------- |
 | <a name="provider_tls"></a> [tls](#provider_tls) | n/a |
 | <a name="provider_foo"></a> [foo](#provider_foo) | >= 1.0 |
 | <a name="provider_aws"></a> [aws](#provider_aws) | >= 2.15.0 |
@@ -58,7 +58,7 @@ followed by another line of text.
 ## Modules
 
 | Name | Source | Version |
-|------|--------|---------|
+| ---- | ------ | ------- |
 | <a name="module_bar"></a> [bar](#module_bar) | baz | 4.5.6 |
 | <a name="module_foo"></a> [foo](#module_foo) | bar | 1.2.3 |
 | <a name="module_baz"></a> [baz](#module_baz) | baz | 4.5.6 |
@@ -67,7 +67,7 @@ followed by another line of text.
 ## Resources
 
 | Name | Type |
-|------|------|
+| ---- | ---- |
 | foo_resource.baz | resource |
 | [null_resource.foo](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
 | [tls_private_key.baz](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key) | resource |
@@ -77,7 +77,7 @@ followed by another line of text.
 ## Inputs
 
 | Name | Description | Type | Default |
-|------|-------------|------|---------|
+| ---- | ----------- | ---- | ------- |
 | <a name="input_unquoted"></a> [unquoted](#input_unquoted) | n/a | `any` | n/a |
 | <a name="input_bool-3"></a> [bool-3](#input_bool-3) | n/a | `bool` | `true` |
 | <a name="input_bool-2"></a> [bool-2](#input_bool-2) | It's bool number two. | `bool` | `false` |
@@ -113,7 +113,7 @@ followed by another line of text.
 ## Outputs
 
 | Name | Description |
-|------|-------------|
+| ---- | ----------- |
 | <a name="output_unquoted"></a> [unquoted](#output_unquoted) | It's unquoted output. |
 | <a name="output_output-2"></a> [output-2](#output_output-2) | It's output number two. |
 | <a name="output_output-1"></a> [output-1](#output_output-1) | It's output number one. |
diff --git a/format/testdata/markdown/table-WithRequired.golden b/format/testdata/markdown/table-WithRequired.golden
index 8e335e5a1..39ab853a7 100644
--- a/format/testdata/markdown/table-WithRequired.golden
+++ b/format/testdata/markdown/table-WithRequired.golden
@@ -32,14 +32,14 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
 
 ## Requirements
 
 | Name | Version |
-|------|---------|
+| ---- | ------- |
 | terraform | >= 0.12 |
 | aws | >= 2.15.0 |
 | foo | >= 1.0 |
@@ -48,7 +48,7 @@ followed by another line of text.
 ## Providers
 
 | Name | Version |
-|------|---------|
+| ---- | ------- |
 | tls | n/a |
 | foo | >= 1.0 |
 | aws | >= 2.15.0 |
@@ -58,7 +58,7 @@ followed by another line of text.
 ## Modules
 
 | Name | Source | Version |
-|------|--------|---------|
+| ---- | ------ | ------- |
 | bar | baz | 4.5.6 |
 | foo | bar | 1.2.3 |
 | baz | baz | 4.5.6 |
@@ -67,7 +67,7 @@ followed by another line of text.
 ## Resources
 
 | Name | Type |
-|------|------|
+| ---- | ---- |
 | foo_resource.baz | resource |
 | [null_resource.foo](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
 | [tls_private_key.baz](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key) | resource |
@@ -77,7 +77,7 @@ followed by another line of text.
 ## Inputs
 
 | Name | Description | Type | Default | Required |
-|------|-------------|------|---------|:--------:|
+| ---- | ----------- | ---- | ------- | :------: |
 | unquoted | n/a | `any` | n/a | yes |
 | bool-3 | n/a | `bool` | `true` | no |
 | bool-2 | It's bool number two. | `bool` | `false` | no |
@@ -113,7 +113,7 @@ followed by another line of text.
 ## Outputs
 
 | Name | Description |
-|------|-------------|
+| ---- | ----------- |
 | unquoted | It's unquoted output. |
 | output-2 | It's output number two. |
 | output-1 | It's output number one. |
diff --git a/format/testdata/markdown/table-WithoutDefault.golden b/format/testdata/markdown/table-WithoutDefault.golden
index 8cc8b3b5e..9f39e5c1d 100644
--- a/format/testdata/markdown/table-WithoutDefault.golden
+++ b/format/testdata/markdown/table-WithoutDefault.golden
@@ -1,7 +1,7 @@
 ## Inputs
 
 | Name | Description | Type |
-|------|-------------|------|
+| ---- | ----------- | ---- |
 | unquoted | n/a | `any` |
 | bool-3 | n/a | `bool` |
 | bool-2 | It's bool number two. | `bool` |
diff --git a/format/testdata/markdown/table-WithoutHTML.golden b/format/testdata/markdown/table-WithoutHTML.golden
index 6840055fa..5c168d927 100644
--- a/format/testdata/markdown/table-WithoutHTML.golden
+++ b/format/testdata/markdown/table-WithoutHTML.golden
@@ -32,14 +32,14 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
 
 ## Requirements
 
 | Name | Version |
-|------|---------|
+| ---- | ------- |
 | terraform | >= 0.12 |
 | aws | >= 2.15.0 |
 | foo | >= 1.0 |
@@ -48,7 +48,7 @@ followed by another line of text.
 ## Providers
 
 | Name | Version |
-|------|---------|
+| ---- | ------- |
 | tls | n/a |
 | foo | >= 1.0 |
 | aws | >= 2.15.0 |
@@ -58,7 +58,7 @@ followed by another line of text.
 ## Modules
 
 | Name | Source | Version |
-|------|--------|---------|
+| ---- | ------ | ------- |
 | bar | baz | 4.5.6 |
 | foo | bar | 1.2.3 |
 | baz | baz | 4.5.6 |
@@ -67,7 +67,7 @@ followed by another line of text.
 ## Resources
 
 | Name | Type |
-|------|------|
+| ---- | ---- |
 | foo_resource.baz | resource |
 | [null_resource.foo](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
 | [tls_private_key.baz](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key) | resource |
@@ -77,7 +77,7 @@ followed by another line of text.
 ## Inputs
 
 | Name | Description | Type | Default |
-|------|-------------|------|---------|
+| ---- | ----------- | ---- | ------- |
 | unquoted | n/a | `any` | n/a |
 | bool-3 | n/a | `bool` | `true` |
 | bool-2 | It's bool number two. | `bool` | `false` |
@@ -113,7 +113,7 @@ followed by another line of text.
 ## Outputs
 
 | Name | Description |
-|------|-------------|
+| ---- | ----------- |
 | unquoted | It's unquoted output. |
 | output-2 | It's output number two. |
 | output-1 | It's output number one. |
diff --git a/format/testdata/markdown/table-WithoutHTMLWithAnchor.golden b/format/testdata/markdown/table-WithoutHTMLWithAnchor.golden
index dfaadf1db..7c210198b 100644
--- a/format/testdata/markdown/table-WithoutHTMLWithAnchor.golden
+++ b/format/testdata/markdown/table-WithoutHTMLWithAnchor.golden
@@ -32,14 +32,14 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
 
 ## Requirements
 
 | Name | Version |
-|------|---------|
+| ---- | ------- |
 | <a name="requirement_terraform"></a> [terraform](#requirement_terraform) | >= 0.12 |
 | <a name="requirement_aws"></a> [aws](#requirement_aws) | >= 2.15.0 |
 | <a name="requirement_foo"></a> [foo](#requirement_foo) | >= 1.0 |
@@ -48,7 +48,7 @@ followed by another line of text.
 ## Providers
 
 | Name | Version |
-|------|---------|
+| ---- | ------- |
 | <a name="provider_tls"></a> [tls](#provider_tls) | n/a |
 | <a name="provider_foo"></a> [foo](#provider_foo) | >= 1.0 |
 | <a name="provider_aws"></a> [aws](#provider_aws) | >= 2.15.0 |
@@ -58,7 +58,7 @@ followed by another line of text.
 ## Modules
 
 | Name | Source | Version |
-|------|--------|---------|
+| ---- | ------ | ------- |
 | <a name="module_bar"></a> [bar](#module_bar) | baz | 4.5.6 |
 | <a name="module_foo"></a> [foo](#module_foo) | bar | 1.2.3 |
 | <a name="module_baz"></a> [baz](#module_baz) | baz | 4.5.6 |
@@ -67,7 +67,7 @@ followed by another line of text.
 ## Resources
 
 | Name | Type |
-|------|------|
+| ---- | ---- |
 | foo_resource.baz | resource |
 | [null_resource.foo](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
 | [tls_private_key.baz](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key) | resource |
@@ -77,7 +77,7 @@ followed by another line of text.
 ## Inputs
 
 | Name | Description | Type | Default |
-|------|-------------|------|---------|
+| ---- | ----------- | ---- | ------- |
 | <a name="input_unquoted"></a> [unquoted](#input_unquoted) | n/a | `any` | n/a |
 | <a name="input_bool-3"></a> [bool-3](#input_bool-3) | n/a | `bool` | `true` |
 | <a name="input_bool-2"></a> [bool-2](#input_bool-2) | It's bool number two. | `bool` | `false` |
@@ -113,7 +113,7 @@ followed by another line of text.
 ## Outputs
 
 | Name | Description |
-|------|-------------|
+| ---- | ----------- |
 | <a name="output_unquoted"></a> [unquoted](#output_unquoted) | It's unquoted output. |
 | <a name="output_output-2"></a> [output-2](#output_output-2) | It's output number two. |
 | <a name="output_output-1"></a> [output-1](#output_output-1) | It's output number one. |
diff --git a/format/testdata/markdown/table-WithoutType.golden b/format/testdata/markdown/table-WithoutType.golden
index 56f65f3f3..51ed6f815 100644
--- a/format/testdata/markdown/table-WithoutType.golden
+++ b/format/testdata/markdown/table-WithoutType.golden
@@ -1,7 +1,7 @@
 ## Inputs
 
 | Name | Description | Default |
-|------|-------------|---------|
+| ---- | ----------- | ------- |
 | unquoted | n/a | n/a |
 | bool-3 | n/a | `true` |
 | bool-2 | It's bool number two. | `false` |
diff --git a/format/testdata/pretty/pretty-Base.golden b/format/testdata/pretty/pretty-Base.golden
index 4957b1bb1..6379866f2 100644
--- a/format/testdata/pretty/pretty-Base.golden
+++ b/format/testdata/pretty/pretty-Base.golden
@@ -32,7 +32,7 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
 
diff --git a/format/testdata/pretty/pretty-OnlyHeader.golden b/format/testdata/pretty/pretty-OnlyHeader.golden
index 303e2018e..a723703b4 100644
--- a/format/testdata/pretty/pretty-OnlyHeader.golden
+++ b/format/testdata/pretty/pretty-OnlyHeader.golden
@@ -32,6 +32,6 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
\ No newline at end of file
diff --git a/format/testdata/pretty/pretty-WithColor.golden b/format/testdata/pretty/pretty-WithColor.golden
index 9d7fe4b11..7c777de96 100644
--- a/format/testdata/pretty/pretty-WithColor.golden
+++ b/format/testdata/pretty/pretty-WithColor.golden
@@ -32,7 +32,7 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |[0m
 
diff --git a/format/testdata/toml/toml-Base.golden b/format/testdata/toml/toml-Base.golden
index b5f33c47b..39e55099e 100644
--- a/format/testdata/toml/toml-Base.golden
+++ b/format/testdata/toml/toml-Base.golden
@@ -1,4 +1,4 @@
-header = "Usage:\n\nExample of 'foo_bar' module in `foo_bar.tf`.\n\n- list item 1\n- list item 2\n\nEven inline **formatting** in _here_ is possible.\nand some [link](https://domain.com/)\n\n* list item 3\n* list item 4\n\n```hcl\nmodule \"foo_bar\" {\n  source = \"github.com/foo/bar\"\n\n  id   = \"1234567890\"\n  name = \"baz\"\n\n  zones = [\"us-east-1\", \"us-west-1\"]\n\n  tags = {\n    Name         = \"baz\"\n    Created-By   = \"first.last@email.com\"\n    Date-Created = \"20180101\"\n  }\n}\n```\n\nHere is some trailing text after code block,\nfollowed by another line of text.\n\n| Name | Description     |\n|------|-----------------|\n| Foo  | Foo description |\n| Bar  | Bar description |"
+header = "Usage:\n\nExample of 'foo_bar' module in `foo_bar.tf`.\n\n- list item 1\n- list item 2\n\nEven inline **formatting** in _here_ is possible.\nand some [link](https://domain.com/)\n\n* list item 3\n* list item 4\n\n```hcl\nmodule \"foo_bar\" {\n  source = \"github.com/foo/bar\"\n\n  id   = \"1234567890\"\n  name = \"baz\"\n\n  zones = [\"us-east-1\", \"us-west-1\"]\n\n  tags = {\n    Name         = \"baz\"\n    Created-By   = \"first.last@email.com\"\n    Date-Created = \"20180101\"\n  }\n}\n```\n\nHere is some trailing text after code block,\nfollowed by another line of text.\n\n| Name | Description     |\n| ---- | --------------- |\n| Foo  | Foo description |\n| Bar  | Bar description |"
 footer = "## This is an example of a footer\n\nIt looks exactly like a header, but is placed at the end of the document"
 
 [[inputs]]
diff --git a/format/testdata/toml/toml-OnlyHeader.golden b/format/testdata/toml/toml-OnlyHeader.golden
index 64836e71f..bafff7981 100644
--- a/format/testdata/toml/toml-OnlyHeader.golden
+++ b/format/testdata/toml/toml-OnlyHeader.golden
@@ -1,4 +1,4 @@
-header = "Usage:\n\nExample of 'foo_bar' module in `foo_bar.tf`.\n\n- list item 1\n- list item 2\n\nEven inline **formatting** in _here_ is possible.\nand some [link](https://domain.com/)\n\n* list item 3\n* list item 4\n\n```hcl\nmodule \"foo_bar\" {\n  source = \"github.com/foo/bar\"\n\n  id   = \"1234567890\"\n  name = \"baz\"\n\n  zones = [\"us-east-1\", \"us-west-1\"]\n\n  tags = {\n    Name         = \"baz\"\n    Created-By   = \"first.last@email.com\"\n    Date-Created = \"20180101\"\n  }\n}\n```\n\nHere is some trailing text after code block,\nfollowed by another line of text.\n\n| Name | Description     |\n|------|-----------------|\n| Foo  | Foo description |\n| Bar  | Bar description |"
+header = "Usage:\n\nExample of 'foo_bar' module in `foo_bar.tf`.\n\n- list item 1\n- list item 2\n\nEven inline **formatting** in _here_ is possible.\nand some [link](https://domain.com/)\n\n* list item 3\n* list item 4\n\n```hcl\nmodule \"foo_bar\" {\n  source = \"github.com/foo/bar\"\n\n  id   = \"1234567890\"\n  name = \"baz\"\n\n  zones = [\"us-east-1\", \"us-west-1\"]\n\n  tags = {\n    Name         = \"baz\"\n    Created-By   = \"first.last@email.com\"\n    Date-Created = \"20180101\"\n  }\n}\n```\n\nHere is some trailing text after code block,\nfollowed by another line of text.\n\n| Name | Description     |\n| ---- | --------------- |\n| Foo  | Foo description |\n| Bar  | Bar description |"
 footer = ""
 inputs = []
 modules = []
diff --git a/format/testdata/xml/xml-Base.golden b/format/testdata/xml/xml-Base.golden
index fbc9b5144..22c94bbd9 100644
--- a/format/testdata/xml/xml-Base.golden
+++ b/format/testdata/xml/xml-Base.golden
@@ -1,5 +1,5 @@
 <module>
-  <header>Usage:&#xA;&#xA;Example of &#39;foo_bar&#39; module in `foo_bar.tf`.&#xA;&#xA;- list item 1&#xA;- list item 2&#xA;&#xA;Even inline **formatting** in _here_ is possible.&#xA;and some [link](https://domain.com/)&#xA;&#xA;* list item 3&#xA;* list item 4&#xA;&#xA;```hcl&#xA;module &#34;foo_bar&#34; {&#xA;  source = &#34;github.com/foo/bar&#34;&#xA;&#xA;  id   = &#34;1234567890&#34;&#xA;  name = &#34;baz&#34;&#xA;&#xA;  zones = [&#34;us-east-1&#34;, &#34;us-west-1&#34;]&#xA;&#xA;  tags = {&#xA;    Name         = &#34;baz&#34;&#xA;    Created-By   = &#34;first.last@email.com&#34;&#xA;    Date-Created = &#34;20180101&#34;&#xA;  }&#xA;}&#xA;```&#xA;&#xA;Here is some trailing text after code block,&#xA;followed by another line of text.&#xA;&#xA;| Name | Description     |&#xA;|------|-----------------|&#xA;| Foo  | Foo description |&#xA;| Bar  | Bar description |</header>
+  <header>Usage:&#xA;&#xA;Example of &#39;foo_bar&#39; module in `foo_bar.tf`.&#xA;&#xA;- list item 1&#xA;- list item 2&#xA;&#xA;Even inline **formatting** in _here_ is possible.&#xA;and some [link](https://domain.com/)&#xA;&#xA;* list item 3&#xA;* list item 4&#xA;&#xA;```hcl&#xA;module &#34;foo_bar&#34; {&#xA;  source = &#34;github.com/foo/bar&#34;&#xA;&#xA;  id   = &#34;1234567890&#34;&#xA;  name = &#34;baz&#34;&#xA;&#xA;  zones = [&#34;us-east-1&#34;, &#34;us-west-1&#34;]&#xA;&#xA;  tags = {&#xA;    Name         = &#34;baz&#34;&#xA;    Created-By   = &#34;first.last@email.com&#34;&#xA;    Date-Created = &#34;20180101&#34;&#xA;  }&#xA;}&#xA;```&#xA;&#xA;Here is some trailing text after code block,&#xA;followed by another line of text.&#xA;&#xA;| Name | Description     |&#xA;| ---- | --------------- |&#xA;| Foo  | Foo description |&#xA;| Bar  | Bar description |</header>
   <footer>## This is an example of a footer&#xA;&#xA;It looks exactly like a header, but is placed at the end of the document</footer>
   <inputs>
     <input>
diff --git a/format/testdata/xml/xml-OnlyHeader.golden b/format/testdata/xml/xml-OnlyHeader.golden
index 312f81ad9..9d2ecc3e1 100644
--- a/format/testdata/xml/xml-OnlyHeader.golden
+++ b/format/testdata/xml/xml-OnlyHeader.golden
@@ -1,5 +1,5 @@
 <module>
-  <header>Usage:&#xA;&#xA;Example of &#39;foo_bar&#39; module in `foo_bar.tf`.&#xA;&#xA;- list item 1&#xA;- list item 2&#xA;&#xA;Even inline **formatting** in _here_ is possible.&#xA;and some [link](https://domain.com/)&#xA;&#xA;* list item 3&#xA;* list item 4&#xA;&#xA;```hcl&#xA;module &#34;foo_bar&#34; {&#xA;  source = &#34;github.com/foo/bar&#34;&#xA;&#xA;  id   = &#34;1234567890&#34;&#xA;  name = &#34;baz&#34;&#xA;&#xA;  zones = [&#34;us-east-1&#34;, &#34;us-west-1&#34;]&#xA;&#xA;  tags = {&#xA;    Name         = &#34;baz&#34;&#xA;    Created-By   = &#34;first.last@email.com&#34;&#xA;    Date-Created = &#34;20180101&#34;&#xA;  }&#xA;}&#xA;```&#xA;&#xA;Here is some trailing text after code block,&#xA;followed by another line of text.&#xA;&#xA;| Name | Description     |&#xA;|------|-----------------|&#xA;| Foo  | Foo description |&#xA;| Bar  | Bar description |</header>
+  <header>Usage:&#xA;&#xA;Example of &#39;foo_bar&#39; module in `foo_bar.tf`.&#xA;&#xA;- list item 1&#xA;- list item 2&#xA;&#xA;Even inline **formatting** in _here_ is possible.&#xA;and some [link](https://domain.com/)&#xA;&#xA;* list item 3&#xA;* list item 4&#xA;&#xA;```hcl&#xA;module &#34;foo_bar&#34; {&#xA;  source = &#34;github.com/foo/bar&#34;&#xA;&#xA;  id   = &#34;1234567890&#34;&#xA;  name = &#34;baz&#34;&#xA;&#xA;  zones = [&#34;us-east-1&#34;, &#34;us-west-1&#34;]&#xA;&#xA;  tags = {&#xA;    Name         = &#34;baz&#34;&#xA;    Created-By   = &#34;first.last@email.com&#34;&#xA;    Date-Created = &#34;20180101&#34;&#xA;  }&#xA;}&#xA;```&#xA;&#xA;Here is some trailing text after code block,&#xA;followed by another line of text.&#xA;&#xA;| Name | Description     |&#xA;| ---- | --------------- |&#xA;| Foo  | Foo description |&#xA;| Bar  | Bar description |</header>
   <footer></footer>
   <inputs></inputs>
   <modules></modules>
diff --git a/format/testdata/yaml/yaml-Base.golden b/format/testdata/yaml/yaml-Base.golden
index 8bb5334b9..d0e20a375 100644
--- a/format/testdata/yaml/yaml-Base.golden
+++ b/format/testdata/yaml/yaml-Base.golden
@@ -33,7 +33,7 @@ header: |-
   followed by another line of text.
 
   | Name | Description     |
-  |------|-----------------|
+  | ---- | --------------- |
   | Foo  | Foo description |
   | Bar  | Bar description |
 footer: |-
diff --git a/format/testdata/yaml/yaml-OnlyHeader.golden b/format/testdata/yaml/yaml-OnlyHeader.golden
index d0a56f2de..00936647e 100644
--- a/format/testdata/yaml/yaml-OnlyHeader.golden
+++ b/format/testdata/yaml/yaml-OnlyHeader.golden
@@ -33,7 +33,7 @@ header: |-
   followed by another line of text.
 
   | Name | Description     |
-  |------|-----------------|
+  | ---- | --------------- |
   | Foo  | Foo description |
   | Bar  | Bar description |
 footer: ""
diff --git a/template/template_test.go b/template/template_test.go
index cc8c08ac3..baffafca7 100644
--- a/template/template_test.go
+++ b/template/template_test.go
@@ -350,9 +350,9 @@ func TestBuiltinFunc(t *testing.T) {
 		{
 			name:     "template builtin functions sanitizeSection",
 			funcName: "sanitizeSection",
-			funcArgs: []string{"\"Example of 'foo_bar' module in `foo_bar.tf`.\n\n| Foo | Bar |\n|-----|-----|\n| foo | bar |\""},
+			funcArgs: []string{"\"Example of 'foo_bar' module in `foo_bar.tf`.\n\n| Foo | Bar |\n| --- | --- |\n| foo | bar |\""},
 			escape:   true,
-			expected: "Example of 'foo\\_bar' module in `foo_bar.tf`.\n\n| Foo | Bar |\n|-----|-----|\n| foo | bar |",
+			expected: "Example of 'foo\\_bar' module in `foo_bar.tf`.\n\n| Foo | Bar |\n| --- | --- |\n| foo | bar |",
 		},
 		{
 			name:     "template builtin functions sanitizeSection",
diff --git a/template/testdata/document/complex.expected b/template/testdata/document/complex.expected
index df0ce93bd..17fe8aac7 100644
--- a/template/testdata/document/complex.expected
+++ b/template/testdata/document/complex.expected
@@ -32,6 +32,6 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
\ No newline at end of file
diff --git a/template/testdata/document/complex.golden b/template/testdata/document/complex.golden
index d3b77d3e4..acaf40d87 100644
--- a/template/testdata/document/complex.golden
+++ b/template/testdata/document/complex.golden
@@ -32,6 +32,6 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
\ No newline at end of file
diff --git a/template/testdata/section/complex.expected b/template/testdata/section/complex.expected
index cebd4ac3c..01cdfd913 100644
--- a/template/testdata/section/complex.expected
+++ b/template/testdata/section/complex.expected
@@ -42,6 +42,6 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
\ No newline at end of file
diff --git a/template/testdata/section/complex.golden b/template/testdata/section/complex.golden
index 5ccbb4a9b..3e3ea977e 100644
--- a/template/testdata/section/complex.golden
+++ b/template/testdata/section/complex.golden
@@ -42,6 +42,6 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
\ No newline at end of file
diff --git a/template/testdata/table/complex-html.markdown.expected b/template/testdata/table/complex-html.markdown.expected
index dd0ac7356..873036908 100644
--- a/template/testdata/table/complex-html.markdown.expected
+++ b/template/testdata/table/complex-html.markdown.expected
@@ -1,1 +1,1 @@
-Usage:<br/><br/>Example of 'foo\_bar' module in `foo_bar.tf`.<br/><br/>- list item 1<br/>- list item 2<br/><br/>Even inline **formatting** in _here_ is possible.<br/>and some [link](https://domain.com/)<br/><br/>* list item 3<br/>* list item 4<pre>module "foo_bar" {<br/>  source = "github.com/foo/bar"<br/><br/>  id   = "1234567890"<br/>  name = "baz"<br/><br/>  zones = ["us-east-1", "us-west-1"]<br/><br/>  tags = {<br/>    Name         = "baz"<br/>    Created-By   = "first.last@email.com"<br/>    Date-Created = "20180101"<br/>  }<br/>}</pre>Here is some trailing text after code block,<br/>followed by another line of text.<br/><br/>\| Name \| Description     \|<br/>\|------\|-----------------\|<br/>\| Foo  \| Foo description \|<br/>\| Bar  \| Bar description \|
\ No newline at end of file
+Usage:<br/><br/>Example of 'foo\_bar' module in `foo_bar.tf`.<br/><br/>- list item 1<br/>- list item 2<br/><br/>Even inline **formatting** in _here_ is possible.<br/>and some [link](https://domain.com/)<br/><br/>* list item 3<br/>* list item 4<pre>module "foo_bar" {<br/>  source = "github.com/foo/bar"<br/><br/>  id   = "1234567890"<br/>  name = "baz"<br/><br/>  zones = ["us-east-1", "us-west-1"]<br/><br/>  tags = {<br/>    Name         = "baz"<br/>    Created-By   = "first.last@email.com"<br/>    Date-Created = "20180101"<br/>  }<br/>}</pre>Here is some trailing text after code block,<br/>followed by another line of text.<br/><br/>\| Name \| Description     \|<br/>\| ---- \| --------------- \|<br/>\| Foo  \| Foo description \|<br/>\| Bar  \| Bar description \|
\ No newline at end of file
diff --git a/template/testdata/table/complex-nohtml.markdown.expected b/template/testdata/table/complex-nohtml.markdown.expected
index 2bf775291..749b2f0a4 100644
--- a/template/testdata/table/complex-nohtml.markdown.expected
+++ b/template/testdata/table/complex-nohtml.markdown.expected
@@ -1,1 +1,1 @@
-Usage:  Example of 'foo\_bar' module in `foo_bar.tf`.  - list item 1 - list item 2  Even inline **formatting** in _here_ is possible. and some [link](https://domain.com/)  * list item 3 * list item 4 ```module "foo_bar" { source = "github.com/foo/bar" id = "1234567890" name = "baz" zones = ["us-east-1", "us-west-1"] tags = { Name = "baz" Created-By = "first.last@email.com" Date-Created = "20180101" } }``` Here is some trailing text after code block, followed by another line of text.  \| Name \| Description     \| \|------\|-----------------\| \| Foo  \| Foo description \| \| Bar  \| Bar description \|
\ No newline at end of file
+Usage:  Example of 'foo\_bar' module in `foo_bar.tf`.  - list item 1 - list item 2  Even inline **formatting** in _here_ is possible. and some [link](https://domain.com/)  * list item 3 * list item 4 ```module "foo_bar" { source = "github.com/foo/bar" id = "1234567890" name = "baz" zones = ["us-east-1", "us-west-1"] tags = { Name = "baz" Created-By = "first.last@email.com" Date-Created = "20180101" } }``` Here is some trailing text after code block, followed by another line of text.  \| Name \| Description     \| \| ---- \| --------------- \| \| Foo  \| Foo description \| \| Bar  \| Bar description \|
\ No newline at end of file
diff --git a/template/testdata/table/complex.asciidoc.expected b/template/testdata/table/complex.asciidoc.expected
index 243240b4b..7cc2a61c0 100644
--- a/template/testdata/table/complex.asciidoc.expected
+++ b/template/testdata/table/complex.asciidoc.expected
@@ -33,6 +33,6 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 \| Name \| Description     \|
-\|------\|-----------------\|
+\| ---- \| --------------- \|
 \| Foo  \| Foo description \|
 \| Bar  \| Bar description \|
\ No newline at end of file
diff --git a/template/testdata/table/complex.golden b/template/testdata/table/complex.golden
index c8b4b9f51..cd43c2c8d 100644
--- a/template/testdata/table/complex.golden
+++ b/template/testdata/table/complex.golden
@@ -32,6 +32,6 @@ Here is some trailing text after code block,
 followed by another line of text.
 
 | Name | Description     |
-|------|-----------------|
+| ---- | --------------- |
 | Foo  | Foo description |
 | Bar  | Bar description |
\ No newline at end of file