Beutifier breaks formatting enclosed in NoFormat

jaw

Member²
Hi,

The beautifier is great most of the time, but there are things it can't handle. For example, it sucks when generating large XML files directly from query.

That is where I found that I could use the "--NoFormat Start" and "--NoFormat End" keywords to have a part of the SELECT ignored. But in 15.0.4 I have found a problem with it.

To recreate. Open a Test window.

Enter below:

Code:
WITH a AS
 (SELECT 123
    FROM DUAL)

--NoFormat Start
SELECT XMLElement("DATA",  XMLCDATA('Hi,

This is some long data that shouldn''t be touched since it is enclosed as string.

Best Regards'))
  FROM a
--NoFormat End

First time I hit beautifier I get this:

Code:
WITH a AS
 (SELECT 123
    FROM DUAL)

 --NoFormat Start
SELECT XMLElement("DATA",  XMLCDATA('Hi,

This is some long data that shouldn''t be touched since it is enclosed as string.

Best Regards'))
  FROM a
--NoFormat End

It might be hard to notice, but I got an extra indention on the "--NoFormat Start" line.

If I rerun the beautifier this happens:

Code:
WITH a AS
 (SELECT 123
    FROM DUAL)

    --NoFormat Start
   SELECT XMLElement("DATA",  XMLCDATA('Hi,

   This is some long data that shouldn''t be touched since it is enclosed as string.

   Best Regards'))
     FROM a
   --NoFormat End

Suddenly everything gets indented, including the string, which really messes up my data output.

Please fix as soon as possible.

Best regards,
jaw
 
Then I get an error PL/SQL Beautifier couldn't parse text, or similar.

More importantly, I guess even if it would work then PL/SQL Developer wouldn't beautify the parts of the code that I actually want it to beautify...
 
Back
Top