diff --git a/src/formatting/formatters/v2-xml-formatter.ts b/src/formatting/formatters/v2-xml-formatter.ts index 975a2c0..ab60c13 100644 --- a/src/formatting/formatters/v2-xml-formatter.ts +++ b/src/formatting/formatters/v2-xml-formatter.ts @@ -45,7 +45,14 @@ export class V2XmlFormatter implements XmlFormatter { // entering CData 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; }