While 'charset' is plainly discouraged (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-charset), title attribute on link tags is something rarely used and with implications that authors might not be aware of (http://stackoverflow.com/a/1959975/1092853).
See [this article on html optimization](http://perfectionkills.com/optimizing-html/#8_script_charset) for the rationale on this.
This scope closely mirrors the `text - text source` scope of the similar setting in the Text bundle. This allows indentation to work unhindered in embedded source such as PHP.
This should be the desired setting for most html types, certain types such as markdown may need an override or a setting of their own.
The “Convert to named entities excl tags” menu action’s whitelist of tags to filter out predated the HTML5 spec and didn’t support its new tags. Prior to this commit this sample markup: <section>I’m markup!</section> would convert to: <section>I’m markup!</section> But with this change it correctly converts to: <section>I’m markup!</section> Complete tag list provided by https://developer.mozilla.org/en-US/docs/Web/HTML/Element. This includes tags deprecated by HTML5, those introduced by it, as well as the WebComponents spec.
Using R: in front of the scope ensures that it loads after any other injected rules to prevent conflicts.
Without this, ‘col’ would match ‘colgroup’ causing wrong indent for the latter.
Previously we would abort, which makes TextMate show an error sheet. Closes #26.
Using abort will show an error dialog in TextMate 2.
A better solution is to insert the actual glyphs (instead of entities) and to use multi-stroke keybindings, see http://blog.macromates.com/2006/multi-stroke-key-bindings/
This is done by matching against /^[\w\-:_]+$/i. In practice current word would only contain a dash, underscore, or colon, if the character classes for the document type has been redefined to make that part of the word character class or if the command is invoked with a selection. This change was made to avoid an issue when using the command in a location like: <p>‸</p>, here “current word” would be “></”. Also enable UTF-8 so /\w/ matches non-ASCII word characters.
The checkbox in the nib previously resulted in a string or integer being stored in the property list returned. We used `to_i` and compared it with `1` for “maximum flexibility”. Now an actual boolean is found in the property list, and as the boolean does not implement the `to_i` method, an exception was thrown. This fix has not been tested on 10.6.