* lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser):
Fix wrong constant name. "]>" pattern match is the same but it is used for "<!DOCTYPE" end mark not "<![CDATA[" end mark. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
43b082d90c
commit
265c2f8eb8
@ -1,3 +1,9 @@
|
|||||||
|
Sat Aug 10 12:47:19 2013 Kouhei Sutou <kou@cozmixng.org>
|
||||||
|
|
||||||
|
* lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser):
|
||||||
|
Fix wrong constant name. "]>" pattern match is the same but
|
||||||
|
it is used for "<!DOCTYPE" end mark not "<![CDATA[" end mark.
|
||||||
|
|
||||||
Sat Aug 10 12:43:15 2013 Kouhei Sutou <kou@cozmixng.org>
|
Sat Aug 10 12:43:15 2013 Kouhei Sutou <kou@cozmixng.org>
|
||||||
|
|
||||||
* lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser):
|
* lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser):
|
||||||
|
@ -43,6 +43,7 @@ module REXML
|
|||||||
REFERENCE_RE = /#{REFERENCE}/
|
REFERENCE_RE = /#{REFERENCE}/
|
||||||
|
|
||||||
DOCTYPE_START = /\A\s*<!DOCTYPE\s/um
|
DOCTYPE_START = /\A\s*<!DOCTYPE\s/um
|
||||||
|
DOCTYPE_END = /\A\s*\]\s*>/um
|
||||||
DOCTYPE_PATTERN = /\s*<!DOCTYPE\s+(.*?)(\[|>)/um
|
DOCTYPE_PATTERN = /\s*<!DOCTYPE\s+(.*?)(\[|>)/um
|
||||||
ATTRIBUTE_PATTERN = /\s*(#{NAME_STR})\s*=\s*(["'])(.*?)\4/um
|
ATTRIBUTE_PATTERN = /\s*(#{NAME_STR})\s*=\s*(["'])(.*?)\4/um
|
||||||
COMMENT_START = /\A<!--/u
|
COMMENT_START = /\A<!--/u
|
||||||
@ -322,9 +323,9 @@ module REXML
|
|||||||
raise REXML::ParseException.new( "error parsing notation: no matching pattern", @source )
|
raise REXML::ParseException.new( "error parsing notation: no matching pattern", @source )
|
||||||
end
|
end
|
||||||
return [ :notationdecl, *vals ]
|
return [ :notationdecl, *vals ]
|
||||||
when CDATA_END
|
when DOCTYPE_END
|
||||||
@document_status = :after_doctype
|
@document_status = :after_doctype
|
||||||
@source.match( CDATA_END, true )
|
@source.match( DOCTYPE_END, true )
|
||||||
return [ :end_doctype ]
|
return [ :end_doctype ]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user