summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners
diff options
context:
space:
mode:
Diffstat (limited to 'lib/coderay/scanners')
-rw-r--r--lib/coderay/scanners/html.rb4
-rw-r--r--lib/coderay/scanners/xml.rb18
2 files changed, 20 insertions, 2 deletions
diff --git a/lib/coderay/scanners/html.rb b/lib/coderay/scanners/html.rb
index 186a255..f37a8dd 100644
--- a/lib/coderay/scanners/html.rb
+++ b/lib/coderay/scanners/html.rb
@@ -130,9 +130,9 @@ module Scanners
next
elsif scan(/#{ENTITY}/ox)
kind = :entity
- elsif match(/[\n>]/)
+ elsif scan(/[\n>]/)
tokens << [:close, :string]
- kind = error
+ kind = :error
state = :initial
end
diff --git a/lib/coderay/scanners/xml.rb b/lib/coderay/scanners/xml.rb
new file mode 100644
index 0000000..d1c6bad
--- /dev/null
+++ b/lib/coderay/scanners/xml.rb
@@ -0,0 +1,18 @@
+module CodeRay
+module Scanners
+
+ load :html
+
+ # XML Scanner
+ #
+ # $Id$
+ #
+ # Currently this is the same scanner as Scanners::HTML.
+ class XML < HTML
+
+ register_for :xml
+
+ end
+
+end
+end