Permalink
Browse files

fix #83 (XML DTD)

  • Loading branch information...
1 parent 99e984d commit d0b9a7cc6f78758a35b574f149c2fc3e9a2a8455 @korny korny committed Feb 17, 2013
Showing with 2 additions and 1 deletion.
  1. +1 −0 Changes.textile
  2. +1 −1 lib/coderay/scanners/html.rb
View
1 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
View
2 lib/coderay/scanners/html.rb
@@ -101,7 +101,7 @@ def scan_tokens encoder, options
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

0 comments on commit d0b9a7c

Please sign in to comment.