Latest REXML and Latest Maruku

This commit is contained in:
Jacques Distler 2008-02-01 01:25:38 -06:00
parent 9a633c0792
commit 15640ca7a3
4 changed files with 7 additions and 7 deletions

View file

@ -53,7 +53,9 @@ module MaRuKu; module Strings
keys[:data] = $'
headers = $1
headers.split("\n").each do |l|
k, v = l.split(':')
# Fails if there are other ':' characters.
# k, v = l.split(':')
k, v = l.split(':', 2)
k, v = normalize_key_and_value(k, v)
k = k.to_sym
# puts "K = #{k}, V=#{v}"

View file

@ -17,8 +17,6 @@ module REXML
attr_writer :normalized
PATTERN = /\s*(#{NAME_STR})\s*=\s*(["'])(.*?)\2/um
NEEDS_A_SECOND_CHECK = /(<|&((#{Entity::NAME});|(#0*((?:\d+)|(?:x[a-fA-F0-9]+)));)?)/um
# Constructor.
# FIXME: The parser doesn't catch illegal characters in attributes
#
@ -150,7 +148,7 @@ module REXML
@element = element
if @normalized
Text.check( @normalized, NEEDS_A_SECOND_CHECK, doctype )
Text.check( @normalized, Text::NEEDS_A_SECOND_CHECK, doctype )
end
self

View file

@ -188,7 +188,7 @@ module REXML
# Method contributed by Henrik Martensson
def strip_quotes(quoted_string)
quoted_string =~ /^[\'\"].*[\´\"]$/ ?
quoted_string =~ /^[\'\"].*[\'\"]$/ ?
quoted_string[1, quoted_string.length-2] :
quoted_string
end

View file

@ -147,7 +147,7 @@ module REXML
# the XML spec. If there is one, we can determine the encoding from
# it.
@buffer = ""
str = @source.read( 2 )
str = @source.read( 2 ) || ''
if encoding
self.encoding = encoding
elsif str[0,2] == "\xfe\xff"
@ -161,7 +161,7 @@ module REXML
else
@line_break = ">"
end
super str+@source.readline( @line_break )
super( @source.eof? ? str : str+@source.readline( @line_break ) )
end
def scan(pattern, cons=false)