[TxMt] Self-closing tags in HTML cause bugs in XML bundle

Allan Odgaard throw-away-1 at macromates.com
Mon Apr 16 08:06:51 UTC 2007


On 16. Apr 2007, at 03:27, Trevor Harmon wrote:

> I use the Insert Close Tag command all the time when writing XML [...]
>
> Expected behavior: TextMate inserts the closing </link> tag  
> automatically
> Actual behavior: TextMate beeps at you

Well, it is expected to insert the closing *HTML* tag, given its  
placement in the HTML bundle ;)

But I updated the command to read TM_HTML_EMPTY_TAGS from the  
environment. As this is unset for XML, it will now close <link> and  
other tags which have an empty content model in HTML.

I also updated the Insert Open/Close Tag (⌃<) to check this  
variable, so now you can write link⌃< in XML and get ‘<link>‸</ 
link>’ (instead of ‘<link ‸>’).




More information about the textmate mailing list