From d7f0a0011dd8f2629c4071b8d3cb0004bb9e2a99 Mon Sep 17 00:00:00 2001 From: murphy Date: Sat, 15 Apr 2006 03:48:36 +0000 Subject: styles/_map.rb added. :cycnus is now default style. html/css.rb adjusted. ROADMAP and TODO updated. Ruby scanner: Fixed a bug: Fancy strings don't allow \w delimiters. They _do_ also allow whitespace delimiters, but adding this would cause many scan errors. So I leave this bug unfixed. --- lib/coderay/scanners/ruby/patterns.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib/coderay/scanners/ruby/patterns.rb') diff --git a/lib/coderay/scanners/ruby/patterns.rb b/lib/coderay/scanners/ruby/patterns.rb index 7bf9103..28439ec 100644 --- a/lib/coderay/scanners/ruby/patterns.rb +++ b/lib/coderay/scanners/ruby/patterns.rb @@ -1,6 +1,8 @@ module CodeRay module Scanners - class Ruby +class Ruby + + module Patterns # :nodoc: RESERVED_WORDS = %w[ and def end in or unless begin @@ -132,8 +134,8 @@ module CodeRay module Scanners # FIXME: \s and = are only a workaround, they are still allowed # as delimiters. - FANCY_START_SAVE = / % ( [qQwWxsr] | (?![\w\s=]) ) (.) /mx - FANCY_START_CORRECT = / % ( [qQwWxsr] | (?!\w) ) (.) /mx + FANCY_START_SAVE = / % ( [qQwWxsr] | (?![a-zA-Z0-9\s=]) ) ([^a-zA-Z0-9]) /mx + FANCY_START_CORRECT = / % ( [qQwWxsr] | (?![a-zA-Z0-9]) ) ([^a-zA-Z0-9]) /mx FancyStringType = { 'q' => [:string, false], @@ -211,4 +213,6 @@ module CodeRay module Scanners end +end + end end -- cgit v1.2.1