在meta.discusre.org向Florian致以干杯和感谢。
问题是我引用了而不是引用,并且在引用块的末尾必须有一个换行符。
修复打字错误和插入换行符成功!
def body(lookup)
quoted = nil
parent = nil
if parent_import_id != nil then
parent_id = lookup::post_id_from_imported_post_id(parent_import_id)
parent = Post.where(id:parent_id).first
if parent != nil then
user = User.where(id:parent.user_id).first
@parent_user_name = user.username_lower
quoted = "[quote=\"#{parent_user_name}, post:#{parent.post_number}, topic:#{parent.topic_id}\"]<br/><br/>#{parent.cooked}<br/>[/quote]\n<br/>"
end
end
return "#{quoted}#{content}<p /><p />#{author}<p />#{author_url}".gsub(/\\n/,'<br/>').strip[0...32000]
end