From 46fce3262ee8efec987c43ad537c8e3eace17907 Mon Sep 17 00:00:00 2001 From: Zheng Xi Zhou Date: Wed, 16 Feb 2022 11:03:11 +0800 Subject: [PATCH] Fix: properties table of cloud resource doc is broken (#3256) If one column of a table contianers multiple line of a json struct, it will break the table. Signed-off-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) }