[TxMt] Re: Fixing YAML Inline Hash Syntax Highlighting

Jacob Coby jcoby at portallabs.com
Wed Dec 10 14:10:13 UTC 2008


On Dec 10, 2008, at 1:22 AM, Michael Sheets wrote:

> On Dec 8, 2008, at 12:07 PM, Jacob Coby wrote:
>
>> 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.
>
> Just committed this change, still a lot of missing items in the YAML
> bundle but that helped it some. Thanks!

Thanks.

I've updated it since the last email because it wasn't  highlighting  
lists 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>


--
Jacob Coby








More information about the textmate mailing list