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

Trevor Harmon trevor at vocaro.com
Mon Apr 16 01:27:43 UTC 2007


I use the Insert Close Tag command all the time when writing XML in  
TextMate. Unfortunately, this command is inherited from the HTML  
bundle, and that causes problems due to the differing semantics  
between HTML and XML. Specifically, HTML defines certain self-closing  
tags, such as <link>, but in XML these tags may have content and are  
not self-closing. As a result, the Insert Close Tag can break in XML  
mode. For example:

1. Create a new document
2. Switch to XML mode
3. Type <link>
4. Type some text
5. Call the Insert Close Tag command by typing Command + Option + .

Expected behavior: TextMate inserts the closing </link> tag  
automatically
Actual behavior: TextMate beeps at you

Trevor




More information about the textmate mailing list