+4

XML Folding Bug

acwj 6 years ago • updated by Jonathan Chayce Dickinson 5 years ago 3
Sublime Text 2 Beta, Build 2181

The root element does not fold up correctly in this XML:

<root>
    <el1>abc</el1>
    <el1><![CDATA[
<el2>
    abc
    def
</el2>
        ]]>
    </el1>
</root>




I have the same problem. You don't even need to have xml in your cdata section.

I see it with this : http://pastebin.com/p3eCPxcS. I cannot fold the "elt" element (more exactly, the code within the element is folded, but only up to the "aaa" line).

If i add a space or a tab before aaa, it works again, it folds correctly. If I remove the blank line on the second line, I don't even have the arrow to fold the code "elt" element
Thanks Keith. Just to add more wood to the fire: https://gist.github.com/045ebca2bcc34fe4e17c (at first I thought it was related to the escaped XML within XML).

According to the other threads you can create fold region using ctrl+shift+[ - which should alleviate some of these issues.