summaryrefslogtreecommitdiff
path: root/js/jquery.syntax.brush.ruby.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/jquery.syntax.brush.ruby.js')
-rw-r--r--js/jquery.syntax.brush.ruby.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/js/jquery.syntax.brush.ruby.js b/js/jquery.syntax.brush.ruby.js
index 93328905..5d37ed1c 100644
--- a/js/jquery.syntax.brush.ruby.js
+++ b/js/jquery.syntax.brush.ruby.js
@@ -30,8 +30,21 @@ Syntax.register('ruby', function(brush) {
matches: Syntax.extractMatches({klass: 'function'}, {klass: 'constant'})
});
+ brush.push({
+ pattern: /`[^`]+`/g,
+ klass: 'string'
+ });
+
+ brush.push({
+ pattern: /\#\{([^\}]*)\}/g,
+ matches: Syntax.extractMatches({
+ brush: 'ruby',
+ only: ['string']
+ }),
+ });
+
// Regular expressions
- brush.push(Syntax.lib.perlStyleRegularExpressions);
+ brush.push(Syntax.lib.perlStyleRegularExpression);
brush.push({pattern: /(@+|\$)[\w]+/g, klass: 'variable'});