From d36718969fedfdca935f65515e50286a880eca18 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 16 Feb 2022 11:30:36 +0800 Subject: [PATCH] Fix: properties table of cloud resource doc is broken (#3265) If one column of a table contianers multiple line of a json struct, it will break the table. Signed-off-by: Zheng Xi Zhou (cherry picked from commit 093a35768e603a4e398d506059e3a0b21dc7762f) Co-authored-by: Zheng Xi Zhou --- references/plugins/references.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/references/plugins/references.go b/references/plugins/references.go index dca51cb7a..383e96513 100644 --- a/references/plugins/references.go +++ b/references/plugins/references.go @@ -1047,8 +1047,8 @@ func (ref *ParseReference) parseTerraformCapabilityParameters(capability types.C for _, v := range variables { var refParam ReferenceParameter refParam.Name = v.Name - refParam.PrintableType = v.Type - refParam.Usage = v.Description + refParam.PrintableType = strings.ReplaceAll(v.Type, "\n", `\n`) + refParam.Usage = strings.ReplaceAll(v.Description, "\n", `\n`) refParam.Required = v.Required refParameterList = append(refParameterList, refParam) }