diff options
author | murphy <murphy@rubychan.de> | 2006-04-15 03:48:36 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2006-04-15 03:48:36 +0000 |
commit | d7f0a0011dd8f2629c4071b8d3cb0004bb9e2a99 (patch) | |
tree | c515d94bda7650c1d40dab9aefa541ef9f9d4c7a /lib/coderay/scanners/ruby | |
parent | 5ee15661dbc2da70927f588e310315233aff6eea (diff) | |
download | coderay-d7f0a0011dd8f2629c4071b8d3cb0004bb9e2a99.tar.gz |
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.
Diffstat (limited to 'lib/coderay/scanners/ruby')
-rw-r--r-- | lib/coderay/scanners/ruby/patterns.rb | 10 |
1 files changed, 7 insertions, 3 deletions
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
|