Skip to content

Commit d0b9a7c

Browse files
committed
fix #83 (XML DTD)
1 parent 99e984d commit d0b9a7c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Changes.textile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ p=. _This files lists all changes in the CodeRay library since the 0.9.8 release
77
h2. Changes in 1.0.9
88

99
* Fix Ruby scanner: Ruby 1.9 hash syntax @{ key: value }@ is highlighted correctly. [GH #106, thanks to Seth Vargo]
10+
* Fix HTML scanner: Accept DTDs. [GH #83]
1011

1112
h2. Changes in 1.0.8
1213

lib/coderay/scanners/html.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def scan_tokens encoder, options
101101
when :initial
102102
if match = scan(/<!--(?:.*?-->|.*)/m)
103103
encoder.text_token match, :comment
104-
elsif match = scan(/<!DOCTYPE(?:.*?>|.*)/m)
104+
elsif match = scan(/<!(\w+)(?:.*?>|.*)|\]>/m)
105105
encoder.text_token match, :doctype
106106
elsif match = scan(/<\?xml(?:.*?\?>|.*)/m)
107107
encoder.text_token match, :preprocessor

0 commit comments

Comments
 (0)