Page 1 of 1

HTML code folding vs. XML code folding

Posted: 27 Apr 2023 08:31
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 2110 times
xml-folding.png
xml-folding.png (6.08 KiB) Viewed 2110 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.

Re: HTML code folding vs. XML code folding

Posted: 30 May 2023 17:44
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.