diff options
-rw-r--r-- | Changes.textile | 1 | ||||
-rw-r--r-- | lib/coderay/scanners/html.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/Changes.textile b/Changes.textile index 02c7b10..877103a 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.9 * Fix Ruby scanner: Ruby 1.9 hash syntax @{ key: value }@ is highlighted correctly. [GH #106, thanks to Seth Vargo] +* Fix HTML scanner: Accept DTDs. [GH #83] h2. Changes in 1.0.8 diff --git a/lib/coderay/scanners/html.rb b/lib/coderay/scanners/html.rb index 49c346d..3ba3b79 100644 --- a/lib/coderay/scanners/html.rb +++ b/lib/coderay/scanners/html.rb @@ -101,7 +101,7 @@ module Scanners when :initial if match = scan(/<!--(?:.*?-->|.*)/m) encoder.text_token match, :comment - elsif match = scan(/<!DOCTYPE(?:.*?>|.*)/m) + elsif match = scan(/<!(\w+)(?:.*?>|.*)|\]>/m) encoder.text_token match, :doctype elsif match = scan(/<\?xml(?:.*?\?>|.*)/m) encoder.text_token match, :preprocessor |