Skip to content

Commit

Permalink
fix #83 (XML DTD)
Browse files Browse the repository at this point in the history
  • Loading branch information
korny committed Feb 17, 2013
1 parent 99e984d commit d0b9a7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changes.textile
Expand Up @@ -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 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 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 h2. Changes in 1.0.8


Expand Down
2 changes: 1 addition & 1 deletion lib/coderay/scanners/html.rb
Expand Up @@ -101,7 +101,7 @@ def scan_tokens encoder, options
when :initial when :initial
if match = scan(/<!--(?:.*?-->|.*)/m) if match = scan(/<!--(?:.*?-->|.*)/m)
encoder.text_token match, :comment encoder.text_token match, :comment
elsif match = scan(/<!DOCTYPE(?:.*?>|.*)/m) elsif match = scan(/<!(\w+)(?:.*?>|.*)|\]>/m)
encoder.text_token match, :doctype encoder.text_token match, :doctype
elsif match = scan(/<\?xml(?:.*?\?>|.*)/m) elsif match = scan(/<\?xml(?:.*?\?>|.*)/m)
encoder.text_token match, :preprocessor encoder.text_token match, :preprocessor
Expand Down

0 comments on commit d0b9a7c

Please sign in to comment.