thehogfather / brackets-code-folding

Code folding extension for brackets IDE
134 stars 42 forks source link

Problems with XML-tags that have dots. #24

Closed eljakim closed 10 years ago

eljakim commented 10 years ago

If there are dots in the tagnames in the XML-document only the last tag with a dot in it can be collapsed.

To reproduce: create an XML document that has the following content.

<a>

  <a.a>

  </a.a>

  <a.b>

  </a.b>
</a>
thehogfather commented 10 years ago

Thanks for reporting. Should be fixed now and hopefully it doesnt break anything else.

eljakim commented 10 years ago

Actually, XML-tags can also contain colons to indicate a namespace.

That case is still not handled properly.

<page>
<a:bla>
</a:bla>
<b:bla>
</b:bla>
</page>

I have not tested all valid XML-tags from http://www.w3.org/TR/xml11/#sec-common-syn , only the things we use.

thehogfather commented 10 years ago

good point. perhaps it is time to read the standards document.

If you're up to the task and have the time, feel free to submit a pull request for a regex that captures valid xml tags, otherwise I will work on it incrementally over the next few days until i think it works well enough.

thehogfather commented 10 years ago

This should now be fixed with the latest version. Feel free to reopen the issue if needed.