diff options
Diffstat (limited to 'lib/coderay')
-rw-r--r-- | lib/coderay/scanners/java_script.rb | 1 | ||||
-rw-r--r-- | lib/coderay/scanners/ruby/patterns.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/coderay/scanners/java_script.rb b/lib/coderay/scanners/java_script.rb index 0187e5b..e9ae14f 100644 --- a/lib/coderay/scanners/java_script.rb +++ b/lib/coderay/scanners/java_script.rb @@ -104,6 +104,7 @@ module Scanners # TODO: string key recognition # There's a problem with expressions like: PAIRS: { 'slide': ['SlideDown','SlideUp'], ... }. + # The commas in the array are confusing the scanner here. # elsif key_expected && match = scan(/["']/) # tokens << [:open, :key] # state = :key diff --git a/lib/coderay/scanners/ruby/patterns.rb b/lib/coderay/scanners/ruby/patterns.rb index c18789b..98e4e93 100644 --- a/lib/coderay/scanners/ruby/patterns.rb +++ b/lib/coderay/scanners/ruby/patterns.rb @@ -87,7 +87,7 @@ module Scanners # assert_equal(129, ?\M-\C-a) ESCAPE = / [abefnrstv] - | M-\\C-|C-\\M-|M-\\c|c\\M-|c|C-|M- + | (?:M-|C-|c) .? | [0-7]{1,3} | x[0-9A-Fa-f]{1,2} | . |