Latest REXML and Latest Maruku
This commit is contained in:
parent
9a633c0792
commit
15640ca7a3
4 changed files with 7 additions and 7 deletions
|
@ -53,7 +53,9 @@ module MaRuKu; module Strings
|
||||||
keys[:data] = $'
|
keys[:data] = $'
|
||||||
headers = $1
|
headers = $1
|
||||||
headers.split("\n").each do |l|
|
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, v = normalize_key_and_value(k, v)
|
||||||
k = k.to_sym
|
k = k.to_sym
|
||||||
# puts "K = #{k}, V=#{v}"
|
# puts "K = #{k}, V=#{v}"
|
||||||
|
|
4
vendor/plugins/rexml/lib/rexml/attribute.rb
vendored
4
vendor/plugins/rexml/lib/rexml/attribute.rb
vendored
|
@ -17,8 +17,6 @@ module REXML
|
||||||
attr_writer :normalized
|
attr_writer :normalized
|
||||||
PATTERN = /\s*(#{NAME_STR})\s*=\s*(["'])(.*?)\2/um
|
PATTERN = /\s*(#{NAME_STR})\s*=\s*(["'])(.*?)\2/um
|
||||||
|
|
||||||
NEEDS_A_SECOND_CHECK = /(<|&((#{Entity::NAME});|(#0*((?:\d+)|(?:x[a-fA-F0-9]+)));)?)/um
|
|
||||||
|
|
||||||
# Constructor.
|
# Constructor.
|
||||||
# FIXME: The parser doesn't catch illegal characters in attributes
|
# FIXME: The parser doesn't catch illegal characters in attributes
|
||||||
#
|
#
|
||||||
|
@ -150,7 +148,7 @@ module REXML
|
||||||
@element = element
|
@element = element
|
||||||
|
|
||||||
if @normalized
|
if @normalized
|
||||||
Text.check( @normalized, NEEDS_A_SECOND_CHECK, doctype )
|
Text.check( @normalized, Text::NEEDS_A_SECOND_CHECK, doctype )
|
||||||
end
|
end
|
||||||
|
|
||||||
self
|
self
|
||||||
|
|
2
vendor/plugins/rexml/lib/rexml/doctype.rb
vendored
2
vendor/plugins/rexml/lib/rexml/doctype.rb
vendored
|
@ -188,7 +188,7 @@ module REXML
|
||||||
|
|
||||||
# Method contributed by Henrik Martensson
|
# Method contributed by Henrik Martensson
|
||||||
def strip_quotes(quoted_string)
|
def strip_quotes(quoted_string)
|
||||||
quoted_string =~ /^[\'\"].*[\´\"]$/ ?
|
quoted_string =~ /^[\'\"].*[\'\"]$/ ?
|
||||||
quoted_string[1, quoted_string.length-2] :
|
quoted_string[1, quoted_string.length-2] :
|
||||||
quoted_string
|
quoted_string
|
||||||
end
|
end
|
||||||
|
|
4
vendor/plugins/rexml/lib/rexml/source.rb
vendored
4
vendor/plugins/rexml/lib/rexml/source.rb
vendored
|
@ -147,7 +147,7 @@ module REXML
|
||||||
# the XML spec. If there is one, we can determine the encoding from
|
# the XML spec. If there is one, we can determine the encoding from
|
||||||
# it.
|
# it.
|
||||||
@buffer = ""
|
@buffer = ""
|
||||||
str = @source.read( 2 )
|
str = @source.read( 2 ) || ''
|
||||||
if encoding
|
if encoding
|
||||||
self.encoding = encoding
|
self.encoding = encoding
|
||||||
elsif str[0,2] == "\xfe\xff"
|
elsif str[0,2] == "\xfe\xff"
|
||||||
|
@ -161,7 +161,7 @@ module REXML
|
||||||
else
|
else
|
||||||
@line_break = ">"
|
@line_break = ">"
|
||||||
end
|
end
|
||||||
super str+@source.readline( @line_break )
|
super( @source.eof? ? str : str+@source.readline( @line_break ) )
|
||||||
end
|
end
|
||||||
|
|
||||||
def scan(pattern, cons=false)
|
def scan(pattern, cons=false)
|
||||||
|
|
Loading…
Add table
Reference in a new issue