Found a fix, along with a fix for comments at the end of lines not being highlighted correctly:
Index: Syntaxes/YAML.plist =================================================================== --- Syntaxes/YAML.plist (revision 10988) +++ Syntaxes/YAML.plist (working copy) @@ -118,7 +118,7 @@ </dict> </dict> <key>match</key> - <string>(?:(?:(-\s*)?(\w+\s*(:)))|(-))\s*([A-Za-z0-9_].*)\s*$</ string> + <string>(?:(?:(-\s*)?(\w+\s*(:)))|(-))\s*([^,{}&#]+)\s*</string> <key>name</key> <string>string.unquoted.yaml</string> </dict>
Basically, I changed it from defining an unquoted string as "a leading word or digit or underscore followed by anything to the eol" to "anything that isn't in [,{}&#] and stop when you run out of chars"
It probably regresses some syntax highlighting, but nothing that I can obviously see or am concerned with.
On Dec 8, 2008, at 10:07 AM, Jacob Coby wrote:
Hi all,
Is it possible to fix the YAML inline-hash syntax highlighting? Working with Symfony, it's very common to have inline hashes in the routing.yml file. They look something like:
feed_enhanced: url: /recently-added.xml param: { module: feed, action: enhanced }
The YAML bundle considers "feed, action: enhanced" to be a value for "module:" where "action:" should be a new key.
Is there a fix? I've briefly looked at fixing it, but I'm not familiar enough with the TM syntax definition to figure this out on my own.
Thanks,
-Jacob
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
-- Jacob Coby Office: (336) 505-4320 jcoby@portallabs.com