diff options
author | murphy <murphy@rubychan.de> | 2009-01-13 15:49:04 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2009-01-13 15:49:04 +0000 |
commit | db6274c90dc88a2a2ca22a78779a705ecb074465 (patch) | |
tree | 04b983cd7ca0dc3fb2097f951c3f79761f6a1b3d /lib/coderay | |
parent | 301adecdbdc5a0b3921c68c19491747b517edc03 (diff) | |
download | coderay-db6274c90dc88a2a2ca22a78779a705ecb074465.tar.gz |
Ruby Scanner: Shebang comments are highlighted as :doctype.
Diffstat (limited to 'lib/coderay')
-rw-r--r-- | lib/coderay/scanners/ruby.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/coderay/scanners/ruby.rb b/lib/coderay/scanners/ruby.rb index 90c640a..721f0e4 100644 --- a/lib/coderay/scanners/ruby.rb +++ b/lib/coderay/scanners/ruby.rb @@ -147,6 +147,10 @@ module Scanners tokens << [match, kind] next + elsif bol? && match = scan(/\#!.*/) + tokens << [match, :doctype] + next + elsif match = scan(/\#.*/) or ( bol? and match = scan(/#{patterns::RUBYDOC_OR_DATA}/o) ) kind = :comment |