Skip to content

Commit

Permalink
Update ruby.js to add missing string variants.
Browse files Browse the repository at this point in the history
Add backquoted string variant (begin: /`/, end: /`/.) - insert line 49
Add %Q, %W, and %x string variants - lines 50..57
  • Loading branch information
DanRathbun committed Sep 15, 2014
1 parent bae449d commit 847c42f
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/languages/ruby.js
Expand Up @@ -46,14 +46,15 @@ function(hljs) {
variants: [
{begin: /'/, end: /'/},
{begin: /"/, end: /"/},
{begin: '%[qw]?\\(', end: '\\)'},
{begin: '%[qw]?\\[', end: '\\]'},
{begin: '%[qw]?{', end: '}'},
{begin: '%[qw]?<', end: '>'},
{begin: '%[qw]?/', end: '/'},
{begin: '%[qw]?%', end: '%'},
{begin: '%[qw]?-', end: '-'},
{begin: '%[qw]?\\|', end: '\\|'},
{begin: /`/, end: /`/},
{begin: '%[qQwWx]?\\(', end: '\\)'},
{begin: '%[qQwWx]?\\[', end: '\\]'},
{begin: '%[qQwWx]?{', end: '}'},
{begin: '%[qQwWx]?<', end: '>'},
{begin: '%[qQwWx]?/', end: '/'},
{begin: '%[qQwWx]?%', end: '%'},
{begin: '%[qQwWx]?-', end: '-'},
{begin: '%[qQwWx]?\\|', end: '\\|'},
{
// \B in the beginning suppresses recognition of ?-sequences where ?
// is the last character of a preceding identifier, as in: `func?4`
Expand Down

0 comments on commit 847c42f

Please sign in to comment.