In defined HTML overlay modes (like htmlmixed+liquid), the current closetag implementation will just bail out during the very specific mode check. If you change just the mode check to let it pass, it still won't be able to get to the nested modes.
This patch is my, admittedly, naive attempt to fix both of these issues. I am fully aware that there is probably a better way to go about this, and welcome any such feedback :)
[util/closetag] Be a little more liberal with mode handling in order …
…to work with overlay modes.
Of note, if your mode name doesn't include xml or htmlmixed at all, for example the mustache overlay demo, the regex still won't match. Is there a way to check the "parent mode" or some other similar mechanism?
Add new state introspection mechanism for nested modes
And move closetag over to it.
This makes the code that gets the XML state out of the mode actually
sound and extensible.
I've committed 23c8c3e instead, which, rather than adding another hack on a big stack of hacks, makes the process of getting the xml state out of a nested state actually well-defined and extensible.
Hey Marijn, this is great. Thanks so much for putting it together so quickly!