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::PUBLIC):
Fix loose "head" match regular expression. [Bug #8701] [ruby-dev:47551] Patch by Ippei Obayashi. Thanks!!! * test/rexml/parse/test_notation_declaration.rb (#test_system_public): Add a test for the above case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									e9f7bd3f60
								
							
						
					
					
						commit
						6d18dd8e4d
					
				
					 3 changed files with 21 additions and 1 deletions
				
			
		|  | @ -1,3 +1,12 @@ | ||||||
|  | Sat Aug 10 11:31:35 2013  Kouhei Sutou  <kou@cozmixng.org> | ||||||
|  | 
 | ||||||
|  | 	* lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser::PUBLIC): | ||||||
|  | 	  Fix loose "head" match regular expression. | ||||||
|  | 	  [Bug #8701] [ruby-dev:47551] | ||||||
|  | 	  Patch by Ippei Obayashi. Thanks!!! | ||||||
|  | 	* test/rexml/parse/test_notation_declaration.rb (#test_system_public): | ||||||
|  | 	  Add a test for the above case. | ||||||
|  | 
 | ||||||
| Sat Aug 10 09:20:21 2013  Zachary Scott  <e@zzak.io> | Sat Aug 10 09:20:21 2013  Zachary Scott  <e@zzak.io> | ||||||
| 
 | 
 | ||||||
| 	* NEWS: [DOC] typo in example reported by @moretea | 	* NEWS: [DOC] typo in example reported by @moretea | ||||||
|  |  | ||||||
|  | @ -77,7 +77,7 @@ module REXML | ||||||
|       ATTLISTDECL_START = /^\s*<!ATTLIST/um |       ATTLISTDECL_START = /^\s*<!ATTLIST/um | ||||||
|       ATTLISTDECL_PATTERN = /^\s*<!ATTLIST\s+#{NAME}(?:#{ATTDEF})*\s*>/um |       ATTLISTDECL_PATTERN = /^\s*<!ATTLIST\s+#{NAME}(?:#{ATTDEF})*\s*>/um | ||||||
|       NOTATIONDECL_START = /^\s*<!NOTATION/um |       NOTATIONDECL_START = /^\s*<!NOTATION/um | ||||||
|       PUBLIC = /^\s*<!NOTATION\s+(\w[\-\w]*)\s+(PUBLIC)\s+(["'])(.*?)\3(?:\s+(["'])(.*?)\5)?\s*>/um |       PUBLIC = /\A\s*<!NOTATION\s+(\w[\-\w]*)\s+(PUBLIC)\s+(["'])(.*?)\3(?:\s+(["'])(.*?)\5)?\s*>/um | ||||||
|       SYSTEM = /^\s*<!NOTATION\s+(\w[\-\w]*)\s+(SYSTEM)\s+(["'])(.*?)\3\s*>/um |       SYSTEM = /^\s*<!NOTATION\s+(\w[\-\w]*)\s+(SYSTEM)\s+(["'])(.*?)\3\s*>/um | ||||||
| 
 | 
 | ||||||
|       TEXT_PATTERN = /\A([^<]*)/um |       TEXT_PATTERN = /\A([^<]*)/um | ||||||
|  |  | ||||||
|  | @ -73,5 +73,16 @@ class TestParseNotationDeclaration < Test::Unit::TestCase | ||||||
|         end |         end | ||||||
|       end |       end | ||||||
|     end |     end | ||||||
|  | 
 | ||||||
|  |     class TestMixed < self | ||||||
|  |       def test_system_public | ||||||
|  |         doctype = parse(<<-INTERNAL_SUBSET) | ||||||
|  | <!NOTATION system-name SYSTEM "system-literal"> | ||||||
|  | <!NOTATION public-name PUBLIC "public-id-literal" 'system-literal'> | ||||||
|  |         INTERNAL_SUBSET | ||||||
|  |         assert_equal(["system-name", "public-name"], | ||||||
|  |                      doctype.notations.collect(&:name)) | ||||||
|  |       end | ||||||
|  |     end | ||||||
|   end |   end | ||||||
| end | end | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 kou
						kou