Prevent Indentation for Inline CDATA

Issue: #194
This commit is contained in:
Josh Johnson 2018-06-12 21:23:31 -04:00
parent 9a2147683c
commit 61a07adb59
1 changed files with 8 additions and 1 deletions

View File

@ -45,7 +45,14 @@ export class V2XmlFormatter implements XmlFormatter {
// entering CData // entering CData
if (location === Location.Text && cc === "<" && nc === "!" && nnc === "[") { if (location === Location.Text && cc === "<" && nc === "!" && nnc === "[") {
output += `${this._getIndent(options, indentLevel)}<`; if (pc === ">" && ppc !== "/") {
output += "<";
}
else {
output += `${this._getIndent(options, indentLevel)}<`;
}
location = Location.CData; location = Location.CData;
} }