diff options
author | murphy <murphy@rubychan.de> | 2008-09-16 21:57:20 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2008-09-16 21:57:20 +0000 |
commit | e7b3056418e54db4361b053a7af030d83e15acf8 (patch) | |
tree | 51370133561259d7c6cf855d03ea6b3fbea5fff0 /lib/coderay | |
parent | 4b542fa158a71cbe0b75ffb9b3a777a1b564f6d7 (diff) | |
download | coderay-e7b3056418e54db4361b053a7af030d83e15acf8.tar.gz |
Added more file extensions to Scanners
* Added file_extensions to Delphi, XML, Debug, Scheme, and NitroXHTML scanners.
* Removed obsolete extension declarations from Scanner test suites.
* Minor cleanups.
Diffstat (limited to 'lib/coderay')
-rw-r--r-- | lib/coderay/scanners/_map.rb | 2 | ||||
-rw-r--r-- | lib/coderay/scanners/debug.rb | 1 | ||||
-rw-r--r-- | lib/coderay/scanners/delphi.rb | 1 | ||||
-rw-r--r-- | lib/coderay/scanners/nitro_xhtml.rb | 1 | ||||
-rw-r--r-- | lib/coderay/scanners/scheme.rb | 2 | ||||
-rw-r--r-- | lib/coderay/scanners/xml.rb | 1 |
6 files changed, 6 insertions, 2 deletions
diff --git a/lib/coderay/scanners/_map.rb b/lib/coderay/scanners/_map.rb index 1c5fc89..e8dfa07 100644 --- a/lib/coderay/scanners/_map.rb +++ b/lib/coderay/scanners/_map.rb @@ -5,8 +5,8 @@ module Scanners :plain => :plaintext, :pascal => :delphi, :irb => :ruby, - :xml => :html, :xhtml => :nitro_xhtml, + :javascript => :java_script, :nitro => :nitro_xhtml default :plain diff --git a/lib/coderay/scanners/debug.rb b/lib/coderay/scanners/debug.rb index 0dee38f..ec594c1 100644 --- a/lib/coderay/scanners/debug.rb +++ b/lib/coderay/scanners/debug.rb @@ -6,6 +6,7 @@ module Scanners include Streamable register_for :debug + file_extension 'raydebug' protected def scan_tokens tokens, options diff --git a/lib/coderay/scanners/delphi.rb b/lib/coderay/scanners/delphi.rb index 5ee07a3..0975b26 100644 --- a/lib/coderay/scanners/delphi.rb +++ b/lib/coderay/scanners/delphi.rb @@ -4,6 +4,7 @@ module Scanners class Delphi < Scanner register_for :delphi + file_extension 'pas' RESERVED_WORDS = [ 'and', 'array', 'as', 'at', 'asm', 'at', 'begin', 'case', 'class', diff --git a/lib/coderay/scanners/nitro_xhtml.rb b/lib/coderay/scanners/nitro_xhtml.rb index d7968cc..4a8ee96 100644 --- a/lib/coderay/scanners/nitro_xhtml.rb +++ b/lib/coderay/scanners/nitro_xhtml.rb @@ -11,6 +11,7 @@ module Scanners include Streamable register_for :nitro_xhtml + file_extension :xhtml NITRO_RUBY_BLOCK = / <\?r diff --git a/lib/coderay/scanners/scheme.rb b/lib/coderay/scanners/scheme.rb index 2aee223..c869a30 100644 --- a/lib/coderay/scanners/scheme.rb +++ b/lib/coderay/scanners/scheme.rb @@ -6,7 +6,7 @@ module CodeRay class Scheme < Scanner register_for :scheme - file_extension :scm + file_extension 'scm' CORE_FORMS = %w[ lambda let let* letrec syntax-case define-syntax let-syntax diff --git a/lib/coderay/scanners/xml.rb b/lib/coderay/scanners/xml.rb index ff923fb..bc6020a 100644 --- a/lib/coderay/scanners/xml.rb +++ b/lib/coderay/scanners/xml.rb @@ -11,6 +11,7 @@ module Scanners class XML < HTML register_for :xml + file_extension 'xml' end |