def convert_quoted_text(match, type, scope)
if match[0].start_with? RS
if scope == :constrained && (attrs = match[2])
unescaped_attrs = %([#{attrs}])
else
return match[0][1..-1]
end
end
if scope == :constrained
if unescaped_attrs
%(#{unescaped_attrs}#{Inline.new(self, :quoted, match[3], :type => type).convert})
else
if (attrlist = match[2])
id = (attributes = parse_quoted_text_attributes attrlist).delete 'id'
type = :unquoted if type == :mark
end
%(#{match[1]}#{Inline.new(self, :quoted, match[3], :type => type, :id => id, :attributes => attributes).convert})
end
else
if (attrlist = match[1])
id = (attributes = parse_quoted_text_attributes attrlist).delete 'id'
type = :unquoted if type == :mark
end
Inline.new(self, :quoted, match[2], :type => type, :id => id, :attributes => attributes).convert
end
end