atom/language-ruby — pull request #30 by ryansobol (2014-04-17 03:42:55+00:00)
Title: Fix grammar formatting of the // regular expression literal

The grammar formatting of the `//` regular expression literal got borked during the translation from `.plist` to `.cson`. Here's the [original formatting](https://github.com/textmate/ruby.tmbundle/blob/master/Syntaxes/Ruby.plist#L920) from the `ruby.tmbundle` in it's full glory.

We can imitate this formatting style using CoffeeScript's multi-line string. I've manually tested each rule in this new style and everything works as intended. No rules have been harmed in the making is this pull request. :no_entry_sign: :hammer: :rat:

Sadly, it's not possible to preserve the regular expression comments using this style. However, the current match string is a nightmare to read and maintain. With this formatting change, it might actually be possible to take a stab at fixing issues #15 and #18. I'm open to any suggestions on a clean way of preserving the comments.

PS: As a bonus side-effect, the syntax highlighting inside the grammar file that follows these grammar rules is no longer borked too.

PPS: If you have any questions on how the regular expression works, I'm happy to explain. It's looks more complicated then it actually is.