Home Download Buy Blog Forum Support

Bug Report (and fix?) for Ruby Syntax Highlighting

Bug Report (and fix?) for Ruby Syntax Highlighting

Postby ptoomey3 on Wed Aug 22, 2012 8:34 pm

The following breaks Ruby syntax highlighting:

foo(/=/)
bar()

In trying to fix this myself I came upon a bug report for the same issue in Textmate (https://github.com/textmate/ruby.tmbundle/pull/14). The maintainer apparently fixed the issue by replacing the operator.assignment.augmented.ruby section of the Ruby tmLanguage file. The original entry was:

<dict>
<key>comment</key>
<string>Needs higher precidence than regular expressions.</string>
<key>match</key>
<string>/=</string>
<key>name</key>
<string>keyword.operator.assignment.augmented.ruby</string>
</dict>

and replaced it with

<dict>
<key>comment</key>
<string>Needs higher precidence than regular expressions.</string>
<key>match</key>
<string>(?&lt;!\()/=</string>
<key>name</key>
<string>keyword.operator.assignment.augmented.ruby</string>
</dict>

I am not 100% clear what the intent of this entry is for. In particular, I am not clear on what "Needs higher precidence than regular expressions." means. However, the patch does seem to fix the original issue.
ptoomey3
 
Posts: 1
Joined: Wed Aug 22, 2012 8:27 pm

Return to Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 17 guests