diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2011-09-09 00:52:01 +0200 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2011-09-09 00:52:01 +0200 |
commit | 9975fcb5c2c59f6aa02040e281b55d904e77d22d (patch) | |
tree | e54eb23cd045ddbbfb8a15cd52158b602d0b4358 /lib | |
parent | 9a2edcce88880766825f46ae3725c90e9f6be3a8 (diff) | |
download | coderay-9975fcb5c2c59f6aa02040e281b55d904e77d22d.tar.gz |
HTML scanner ignores <% tags and accepts :state option
Diffstat (limited to 'lib')
-rw-r--r-- | lib/coderay/scanners/html.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/coderay/scanners/html.rb b/lib/coderay/scanners/html.rb index fcf89cb..98d06fc 100644 --- a/lib/coderay/scanners/html.rb +++ b/lib/coderay/scanners/html.rb @@ -81,7 +81,7 @@ module Scanners end def scan_tokens encoder, options - state = @state + state = options[:state] || @state plain_string_content = @plain_string_content in_tag = in_attribute = nil @@ -103,7 +103,7 @@ module Scanners encoder.text_token match, :doctype elsif match = scan(/<\?xml(?:.*?\?>|.*)/m) encoder.text_token match, :preprocessor - elsif match = scan(/<\?(?:.*?\?>|.*)|<%(?:.*?%>|.*)/m) + elsif match = scan(/<\?(?:.*?\?>|.*)/m) encoder.text_token match, :comment elsif match = scan(/<\/[-\w.:]*>?/m) in_tag = nil |