facelessuser/BracketHighlighter — pull request #194 by mariomainz (2014-10-16 16:14:15+00:00)
Title: Don't match variables/symbols as the `end` keyword in Ruby

To avoid matching variables and symbols named `end` as the keyword for a block, the regular expression was updated to:
- not match if there is a colon after `end` (then `end` is a symbol key in a hash)
- match whitespace before `end` instead of word boundary (to avoid matching `self.end` and the like)
- match semicolon before `end` in addition to whitespace (because `do; ...;end` is a valid line, even if formatted poorly)

This fixes #193 and some other edge cases.