Can add string to scalars in any order #1234

This commit is contained in:
Mike Farah
2022-06-15 17:09:17 -07:00
parent b9309a42a4
commit 60c037f57e
2 changed files with 21 additions and 0 deletions
+3
View File
@@ -103,6 +103,9 @@ func addScalars(context Context, target *CandidateNode, lhs *yaml.Node, rhs *yam
} else if lhsTag == "!!str" {
target.Node.Tag = lhs.Tag
target.Node.Value = lhs.Value + rhs.Value
} else if rhsTag == "!!str" {
target.Node.Tag = rhs.Tag
target.Node.Value = lhs.Value + rhs.Value
} else if lhsTag == "!!int" && rhsTag == "!!int" {
format, lhsNum, err := parseInt64(lhs.Value)
if err != nil {