Fixed xml comment in array of scalars #1465

This commit is contained in:
Mike Farah
2022-12-17 10:27:54 +11:00
parent 481ea64ccc
commit 48d00f807e
2 changed files with 15 additions and 4 deletions
+5
View File
@@ -259,6 +259,11 @@ var xmlScenarios = []formatScenario{
input: "<root>value<!-- comment-->anotherValue </root>",
expected: "root:\n # comment\n - value\n - anotherValue\n",
},
{
skipDoc: true,
input: "<root><cats><cat>quick</cat><cat>soft</cat><!-- kitty_comment--><cat>squishy</cat></cats></root>",
expected: "root:\n cats:\n cat:\n - quick\n - soft\n # kitty_comment\n\n - squishy\n",
},
{
description: "Parse xml: simple",
subdescription: "Notice how all the values are strings, see the next example on how you can fix that.",