Skip to content

Formatting Affects CDATA #227

Closed
Closed
@emericklaw

Description

@emericklaw

Description

From what I can see in the discussion in #5 CDATA formatting should be left alone.

However this does not seem to work.

<Job>
  <SQLQuery>
    <SQLSelect>
      <![CDATA[
        select
        *
        from test
        where
        aaa.aaa='AAA' and 
        isnull(BBB.BBB,0)=0 and
        isnull(CCC.CCC,0)=1 and
        DDD.DDD is null and
        exists (select 1 from EEE where EEE.EEE=EEE.EEE and EEE is null) and
        exists (select 1 from FFF where FFF.FFF=FFF.FFF) and
        '{GGG}' like '%'+GGG.GGG+'%'
      ]]>
    </SQLSelect>
	</SQLQuery>
</Job>

Becomes

<Job>
  <SQLQuery>
    <SQLSelect>
      <![CDATA[
        select
        *
        from test
        where aaa.aaa='AAA' and isnull(BBB.BBB,0)=0 and isnull(CCC.CCC,0)=1 and
        DDD.DDD is null and
        exists (select 1 from EEE where EEE.EEE=EEE.EEE and EEE is null) and
        exists (select 1 from FFF where FFF.FFF=FFF.FFF) and
        '{GGG}' like '%'+GGG.GGG+'%'
      ]]>
    </SQLSelect>
  </SQLQuery>
</Job>

I am not sure what it is trying to achieve since I would have thought more would be formatted onto one line.

Formatter Implementation

v2

XML Tools Version

2.3.2

VS Code Version

1.26.1

Operating System

Windows 10

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions