From 132b75e58dba4c93278721d60f177cfbee7d0e46 Mon Sep 17 00:00:00 2001 From: murphy Date: Tue, 4 Apr 2006 13:23:02 +0000 Subject: 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. --- lib/coderay/scanners/ruby/patterns.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/coderay/scanners/ruby') 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'] -- cgit v1.2.1