Skip to content

Commit 6e0f78d

Browse files
authored
Trim values in parsed xml only if result is empty (#296)
1 parent 29f8cf8 commit 6e0f78d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/protocol-test-xml-stub.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ const compareEquivalentXmlBodies = (expectedBody: string, generatedBody: string)
1616
attributeNamePrefix: '',
1717
ignoreAttributes: false,
1818
parseNodeValue: false,
19-
tagValueProcessor: (val: any, tagName: any) => decodeEscapedXml(val)
19+
trimValues: false,
20+
tagValueProcessor: (val: any, tagName: any) => val.trim() === "" ? "" : decodeEscapedXml(val)
2021
};
2122

2223
const parseXmlBody = (body: string) => {

0 commit comments

Comments
 (0)