summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/coderay.rb10
-rw-r--r--lib/coderay/helpers/word_list.rb5
-rw-r--r--lib/coderay/scanners/html.rb5
3 files changed, 6 insertions, 14 deletions
diff --git a/lib/coderay.rb b/lib/coderay.rb
index 876d770..88c7cc2 100644
--- a/lib/coderay.rb
+++ b/lib/coderay.rb
@@ -78,12 +78,12 @@
# Read this to get a general view what CodeRay provides.
#
# == Scanning
-#
-# Scanning means analysing an input string, splitting it up into Tokens.
-# Each Token knows about what type it is: string, comment, class name, etc.
+#
+# Scanning means analysing an input string, splitting it up into Tokens.
+# Each Token knows about what type it is: string, comment, class name, etc.
#
-# Each +lang+ (language) has its own Scanner; for example, <tt>:ruby</tt> code is
-# handled by CodeRay::Scanners::Ruby.
+# Each +lang+ (language) has its own Scanner; for example, <tt>:ruby</tt> code is
+# handled by CodeRay::Scanners::Ruby.
#
# CodeRay.scan:: Scan a string in a given language into Tokens.
# This is the most common method to use.
diff --git a/lib/coderay/helpers/word_list.rb b/lib/coderay/helpers/word_list.rb
index ea969c3..4a42c4a 100644
--- a/lib/coderay/helpers/word_list.rb
+++ b/lib/coderay/helpers/word_list.rb
@@ -4,11 +4,6 @@ module CodeRay
#
# <b>A Hash subclass designed for mapping word lists to token types.</b>
#
- # Copyright (c) 2006-2011 by murphy (Kornelius Kalnbach) <murphy rubychan de>
- #
- # License:: LGPL / ask the author
- # Version:: 2.0 (2011-05-08)
- #
# A WordList is a Hash with some additional features.
# It is intended to be used for keyword recognition.
#
diff --git a/lib/coderay/scanners/html.rb b/lib/coderay/scanners/html.rb
index 98d06fc..733dd6f 100644
--- a/lib/coderay/scanners/html.rb
+++ b/lib/coderay/scanners/html.rb
@@ -149,12 +149,9 @@ module Scanners
if match = scan(/=/) #/
encoder.text_token match, :operator
state = :attribute_value
- elsif scan(/#{ATTR_NAME}/o) || scan(/#{TAG_END}/o)
- state = :attribute
- next
else
- encoder.text_token getch, :error
state = :attribute
+ next
end
when :attribute_value