summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners
diff options
context:
space:
mode:
Diffstat (limited to 'lib/coderay/scanners')
-rw-r--r--lib/coderay/scanners/_map.rb22
-rw-r--r--lib/coderay/scanners/c.rb6
-rw-r--r--lib/coderay/scanners/delphi.rb6
-rw-r--r--lib/coderay/scanners/html.rb6
-rw-r--r--lib/coderay/scanners/nitro_html.rb6
-rw-r--r--lib/coderay/scanners/plaintext.rb6
-rw-r--r--lib/coderay/scanners/rhtml.rb6
-rw-r--r--lib/coderay/scanners/ruby.rb7
-rw-r--r--lib/coderay/scanners/ruby/patterns.rb12
9 files changed, 45 insertions, 32 deletions
diff --git a/lib/coderay/scanners/_map.rb b/lib/coderay/scanners/_map.rb
index f6e4452..1482ee9 100644
--- a/lib/coderay/scanners/_map.rb
+++ b/lib/coderay/scanners/_map.rb
@@ -1,14 +1,14 @@
module CodeRay
- module Scanners
-
- map :cpp => :c,
- :plain => :plaintext,
- :pascal => :delphi,
- :irb => :ruby,
- :xml => :html,
- :xhtml => :nitro_html
+module Scanners
+
+ map :cpp => :c,
+ :plain => :plaintext,
+ :pascal => :delphi,
+ :irb => :ruby,
+ :xml => :html,
+ :xhtml => :nitro_html
- default :plain
-
- end
+ default :plain
+
+end
end
diff --git a/lib/coderay/scanners/c.rb b/lib/coderay/scanners/c.rb
index ae0af73..effaaa1 100644
--- a/lib/coderay/scanners/c.rb
+++ b/lib/coderay/scanners/c.rb
@@ -1,4 +1,5 @@
-module CodeRay module Scanners
+module CodeRay
+module Scanners
class C < Scanner
@@ -150,4 +151,5 @@ module CodeRay module Scanners
end
-end end
+end
+end
diff --git a/lib/coderay/scanners/delphi.rb b/lib/coderay/scanners/delphi.rb
index d02c632..c92fab5 100644
--- a/lib/coderay/scanners/delphi.rb
+++ b/lib/coderay/scanners/delphi.rb
@@ -1,4 +1,5 @@
-module CodeRay module Scanners
+module CodeRay
+module Scanners
class Delphi < Scanner
@@ -124,4 +125,5 @@ module CodeRay module Scanners
end
-end end
+end
+end
diff --git a/lib/coderay/scanners/html.rb b/lib/coderay/scanners/html.rb
index e8eea61..186a255 100644
--- a/lib/coderay/scanners/html.rb
+++ b/lib/coderay/scanners/html.rb
@@ -1,4 +1,5 @@
-module CodeRay module Scanners
+module CodeRay
+module Scanners
# HTML Scanner
#
@@ -162,4 +163,5 @@ module CodeRay module Scanners
end
-end end
+end
+end
diff --git a/lib/coderay/scanners/nitro_html.rb b/lib/coderay/scanners/nitro_html.rb
index 86d4992..119924b 100644
--- a/lib/coderay/scanners/nitro_html.rb
+++ b/lib/coderay/scanners/nitro_html.rb
@@ -1,4 +1,5 @@
-module CodeRay module Scanners
+module CodeRay
+module Scanners
load :html
load :ruby
@@ -120,4 +121,5 @@ module CodeRay module Scanners
end
-end end
+end
+end
diff --git a/lib/coderay/scanners/plaintext.rb b/lib/coderay/scanners/plaintext.rb
index 0aebf35..3824ee9 100644
--- a/lib/coderay/scanners/plaintext.rb
+++ b/lib/coderay/scanners/plaintext.rb
@@ -1,4 +1,5 @@
-module CodeRay module Scanners
+module CodeRay
+module Scanners
class Plaintext < Scanner
@@ -10,4 +11,5 @@ module CodeRay module Scanners
end
-end end
+end
+end
diff --git a/lib/coderay/scanners/rhtml.rb b/lib/coderay/scanners/rhtml.rb
index 77a4366..3b1817e 100644
--- a/lib/coderay/scanners/rhtml.rb
+++ b/lib/coderay/scanners/rhtml.rb
@@ -1,4 +1,5 @@
-module CodeRay module Scanners
+module CodeRay
+module Scanners
load :html
load :ruby
@@ -60,4 +61,5 @@ module CodeRay module Scanners
end
-end end
+end
+end
diff --git a/lib/coderay/scanners/ruby.rb b/lib/coderay/scanners/ruby.rb
index 1dbcb17..6e08a1f 100644
--- a/lib/coderay/scanners/ruby.rb
+++ b/lib/coderay/scanners/ruby.rb
@@ -1,4 +1,5 @@
-module CodeRay module Scanners
+module CodeRay
+module Scanners
# This scanner is really complex, since Ruby _is_ a complex language!
#
@@ -390,5 +391,7 @@ module CodeRay module Scanners
end
end
-end end
+end
+end
+
# vim:fdm=marker
diff --git a/lib/coderay/scanners/ruby/patterns.rb b/lib/coderay/scanners/ruby/patterns.rb
index 28439ec..63d12f0 100644
--- a/lib/coderay/scanners/ruby/patterns.rb
+++ b/lib/coderay/scanners/ruby/patterns.rb
@@ -1,8 +1,7 @@
-module CodeRay module Scanners
+module CodeRay
+module Scanners
-class Ruby
-
- module Patterns # :nodoc:
+ module Ruby::Patterns # :nodoc:
RESERVED_WORDS = %w[
and def end in or unless begin
@@ -210,9 +209,8 @@ class Ruby
super kind, interpreted, delim, heredoc, paren, paren_depth, pattern, :initial
end
end unless defined? StringState
-
+
end
end
-
-end end
+end