mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
2 changed files with 9 additions and 2 deletions
|
@ -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>
|
||||
|
||||
* lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser):
|
||||
|
|
|
@ -43,6 +43,7 @@ module REXML
|
|||
REFERENCE_RE = /#{REFERENCE}/
|
||||
|
||||
DOCTYPE_START = /\A\s*<!DOCTYPE\s/um
|
||||
DOCTYPE_END = /\A\s*\]\s*>/um
|
||||
DOCTYPE_PATTERN = /\s*<!DOCTYPE\s+(.*?)(\[|>)/um
|
||||
ATTRIBUTE_PATTERN = /\s*(#{NAME_STR})\s*=\s*(["'])(.*?)\4/um
|
||||
COMMENT_START = /\A<!--/u
|
||||
|
@ -322,9 +323,9 @@ module REXML
|
|||
raise REXML::ParseException.new( "error parsing notation: no matching pattern", @source )
|
||||
end
|
||||
return [ :notationdecl, *vals ]
|
||||
when CDATA_END
|
||||
when DOCTYPE_END
|
||||
@document_status = :after_doctype
|
||||
@source.match( CDATA_END, true )
|
||||
@source.match( DOCTYPE_END, true )
|
||||
return [ :end_doctype ]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue