Skip to content

Commit

Permalink
Escaped output default
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Feb 1, 2022
1 parent 02712e9 commit 79861d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ func (a *Action) renderOutput() error {
inputTable.SetColWidth(maxWidth)

for _, key := range keys {
var _default string
var outputDefault string
if len(a.Inputs[key].Default) > 0 {
_default = fmt.Sprintf("`%s`", a.Inputs[key].Default)
outputDefault = fmt.Sprintf("`\"%s\"`", a.Inputs[key].Default)
}
row := []string{key, "string", strconv.FormatBool(a.Inputs[key].Required), _default, wordWrap(a.Inputs[key].Description, maxWords)}
row := []string{key, "string", strconv.FormatBool(a.Inputs[key].Required), outputDefault, wordWrap(a.Inputs[key].Description, maxWords)}
inputTable.Append(row)
}

Expand Down

0 comments on commit 79861d3

Please sign in to comment.