diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2012-06-19 16:48:06 +0200 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2012-06-19 16:48:06 +0200 |
commit | 3ebeee9c8a667a796d2940e23c3ef26381f1e2d3 (patch) | |
tree | d104ee4f63aa8fedbda4823a57a220a9bf4ff30a | |
parent | 27e8836893974434ff4f54273a3b59b4ce86f74c (diff) | |
download | coderay-3ebeee9c8a667a796d2940e23c3ef26381f1e2d3.tar.gz |
HTML scanner accepts boolean attributes; fixes issue #26
-rw-r--r-- | Changes.textile | 1 | ||||
-rw-r--r-- | lib/coderay/scanners/html.rb | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/Changes.textile b/Changes.textile index 470ba33..4050253 100644 --- a/Changes.textile +++ b/Changes.textile @@ -7,6 +7,7 @@ p=. _This files lists all changes in the CodeRay library since the 0.9.8 release h2. Changes in 1.0.7 * Fix issue with plugin files not being loaded. [GH-20, thanks to Will Read] +* Fix HTML scanner bug: Don't choke on boolean attributes. [GH-26, thanks to jugglinmike] h2. Changes in 1.0.6 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 |