diff options
author | murphy <murphy@rubychan.de> | 2006-04-04 13:23:02 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2006-04-04 13:23:02 +0000 |
commit | 132b75e58dba4c93278721d60f177cfbee7d0e46 (patch) | |
tree | d4491961c01b9c9b91e7d3c25fefa4a4b5c5c5de /lib/coderay/scanners/ruby | |
parent | 0d919d07f67166981cea476e1febbc40af2eae9c (diff) | |
download | coderay-132b75e58dba4c93278721d60f177cfbee7d0e46.tar.gz |
Added HTML scanner!
Added test/html/suite.rb and tolkien.in.html test.
Benchmark produces inline line numbers now.
Minor changes to Ruby and C scanners.
Rakefile: unit tests now in -d mode.
Diffstat (limited to 'lib/coderay/scanners/ruby')
-rw-r--r-- | lib/coderay/scanners/ruby/patterns.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/coderay/scanners/ruby/patterns.rb b/lib/coderay/scanners/ruby/patterns.rb index d75a17a..c007d8c 100644 --- a/lib/coderay/scanners/ruby/patterns.rb +++ b/lib/coderay/scanners/ruby/patterns.rb @@ -130,16 +130,17 @@ module CodeRay module Scanners RDOC_DATA_START = / ^=begin (?!\S) | ^__END__$ /x
- FANCY_START = / % ( [qQwWxsr] | (?![\w\s=]) ) (.) /mox
+ # 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
FancyStringType = {
'q' => [:string, false],
'Q' => [:string, true],
'r' => [:regexp, true],
's' => [:symbol, false],
- 'x' => [:shell, true],
- 'w' => [:string, :word],
- 'W' => [:string, :word],
+ 'x' => [:shell, true]
}
FancyStringType['w'] = FancyStringType['q']
FancyStringType['W'] = FancyStringType[''] = FancyStringType['Q']
|