@@ 169,10 169,17 @@ module RML
}
q = Token.new(:quote, {:attribution => attribution}, [])
while content_lines.length > 0
- q.content += content_lines.take_while{|k| k.kind_of? Token or k !~ /^>/}
+ content = content_lines.take_while{|k| k.kind_of? Token or k !~ /^>/}
rest = content_lines.drop_while{|k| k.kind_of? Token or k !~ /^>/}
+ if content[-1] =~ /said:\s*$/i
+ new_attr = content[-1]
+ content[-1,1] = []
+ else
+ new_attr = ""
+ end
+ q.content += content
subquote = rest.take_while{|k| k.kind_of? String and k =~ /^>/}
- q.content << process_quote_sub("", subquote) if subquote.size > 0
+ q.content << process_quote_sub(new_attr, subquote) if subquote.size > 0
content_lines = rest.drop_while{|k| k.kind_of? String and k =~ /^>/}
end
return q