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
|
// entering StartTag.Attribute.AttributeValue
|
||||||
else if (location === Location.Attribute && cc === "\"") {
|
else if (location === Location.Attribute && (cc === "\"" || cc === "'")) {
|
||||||
output += "\"";
|
output += cc;
|
||||||
lastNonTextLocation = location;
|
lastNonTextLocation = location;
|
||||||
location = Location.AttributeValue;
|
location = Location.AttributeValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// exiting StartTag.Attribute.AttributeValue, entering StartTag
|
// exiting StartTag.Attribute.AttributeValue, entering StartTag
|
||||||
else if (location === Location.AttributeValue && cc === "\"") {
|
else if (location === Location.AttributeValue && (cc === "\"" || cc === "'")) {
|
||||||
output += "\"";
|
output += cc;
|
||||||
lastNonTextLocation = location;
|
lastNonTextLocation = location;
|
||||||
location = Location.StartTag;
|
location = Location.StartTag;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<root>
|
<root>
|
||||||
<element attr='1' />
|
<element attr='1' />
|
||||||
<element attr='2' />
|
<element attr='2' />
|
||||||
</root>
|
</root>
|
|
@ -1,4 +1,4 @@
|
||||||
<root>
|
<root>
|
||||||
<element attr='1' />
|
<element attr='1' />
|
||||||
<element attr='2' />
|
<element attr='2' />
|
||||||
</root>
|
</root>
|
Loading…
Add table
Reference in a new issue