parent
36820ce320
commit
be30a5671b
3 changed files with 8 additions and 8 deletions
|
@ -120,15 +120,15 @@ export class V2XmlFormatter implements XmlFormatter {
|
|||
}
|
||||
|
||||
// entering StartTag.Attribute.AttributeValue
|
||||
else if (location === Location.Attribute && cc === "\"") {
|
||||
output += "\"";
|
||||
else if (location === Location.Attribute && (cc === "\"" || cc === "'")) {
|
||||
output += cc;
|
||||
lastNonTextLocation = location;
|
||||
location = Location.AttributeValue;
|
||||
}
|
||||
|
||||
// exiting StartTag.Attribute.AttributeValue, entering StartTag
|
||||
else if (location === Location.AttributeValue && cc === "\"") {
|
||||
output += "\"";
|
||||
else if (location === Location.AttributeValue && (cc === "\"" || cc === "'")) {
|
||||
output += cc;
|
||||
lastNonTextLocation = location;
|
||||
location = Location.StartTag;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<root>
|
||||
<element attr='1' />
|
||||
<element attr='2' />
|
||||
<element attr='1' />
|
||||
<element attr='2' />
|
||||
</root>
|
|
@ -1,4 +1,4 @@
|
|||
<root>
|
||||
<element attr='1' />
|
||||
<element attr='2' />
|
||||
<element attr='1' />
|
||||
<element attr='2' />
|
||||
</root>
|
Loading…
Add table
Reference in a new issue