Using an entity for block of XML destroys my pretty printing layout

Questions about XML that are not covered by the other forums should go here.
menkalos
Posts: 13
Joined: Wed May 13, 2015 11:59 pm

Using an entity for block of XML destroys my pretty printing layout

Post by menkalos » Tue Nov 17, 2020 9:37 pm

I know you can use an entity to represent both inline text and an entire block of XML tags.

When I use an entity to represent a large block of XML, and the do the CTRL-SHIFT-P to "pretty print" the XML, the entity is treated as an "inline" thing and (even if what comes before it and after it are their own blocks) gets the white space before and after it removed. This makes it very hard to read by burying what could be a very important element in the middle of a line and messing up the formatting of what came before and after as well.

I'd love to know of a way to address this, and if there is not yet one, to encourage the devs to address this somehow.

Thanks much!!!

Radu
Posts: 7315
Joined: Fri Jul 09, 2004 5:18 pm

Re: Using an entity for block of XML destroys my pretty printing layout

Post by Radu » Wed Nov 18, 2020 5:40 pm

Hi,

Thanks for the report, I added an internal issue for it: "EXM-46792 - Treat entity reference in element only content as an element".
If we make any progress on this in a future release I will update this forum post.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply