Files
Cong-Cong PanandGitHub 2155f341e2 fix(xml/codegen): Fix wrong minification of spaces in a self-closing tag (#7595)
**Description:**

xml codegen with option `minify: true`.

input:
```xml
<foo attributeName="OK" />
```

expected:
```xml
<foo attributeName="OK"/>
```

actual:

```xml
<foo attributeName="OK" />
```

---

We already escape the attribute value in `escape_string` function, so we
do not need to check whether it contains a specific string.
2023-06-29 06:11:34 +00:00

15 lines
547 B
XML

<?xml version="1.0" encoding="UTF-8"?>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
<foo attributeName="He said &quot;OK&quot;"></foo>
<foo attributeName="He said &lt;OK&lt;"></foo>
<foo attributeName="He said &gt;OK&gt;"></foo>
<foo attributeName="He said >OK>"></foo>
<foo attributeName="He said &apos;OK&apos;"></foo>
<foo attributeName="He said &amp;OK&amp;"></foo>
<foo>He said &gt;OK&gt;</foo>
<foo attributeName="OK" />
</note>