HTML code folding vs. XML code folding

Report issues, odd behaviors or submit a detailed bug report.
Post Reply
User avatar
pjj
Posts: 2108
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

HTML code folding vs. XML code folding

Post by pjj »

It's not a bug, but rather an inconsistency: HTML tags are folded differently than XML tags:
html-folding.png
html-folding.png (6.35 KiB) Viewed 1235 times
xml-folding.png
xml-folding.png (6.08 KiB) Viewed 1235 times
Is there a reason for this? Perhaps XML tags could be folded the same way as HTML ones, so that the closing tag would not be visible? In both PHP and JS highlighters folding is done the same way as in HTML, so the last line of the fold isn't displayed, either.
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
User avatar
Rickard Johansson
Site Admin
Posts: 6575
Joined: 19 Jul 2006 14:29

Re: HTML code folding vs. XML code folding

Post by Rickard Johansson »

Folding in XML is entirely indention based. So folding may end one line above the end tag. Including the end tag in the fold could cause other issues e.g. if the line contain another start tag.

Code: Select all

</end><start>
In HTML some tags are named and the end tag is included.
Post Reply