Merge branch 'dev_aliyun' into dev_cxt

dev_ec
cxt 5 years ago
commit e837b22cad

@ -9,11 +9,11 @@ json.shixun_list do
reg = /^[,。?:;‘’!“”—……、]/
# 附件的替换
atta_reg = /!\[\]\(\/api\/attachments\/\d+\)/
highlights[:description]&.first&.sub!(reg, '').sub!(atta_reg, '')
highlights[:content]&.first&.sub!(reg, '').sub!(atta_reg, '')
highlights[:description]&.first&.sub!(reg, '')&.sub!(atta_reg, '')
highlights[:content]&.first&.sub!(reg, '')&.sub!(atta_reg, '')
json.title highlights.delete(:name)&.join('...') || obj.searchable_title
json.description highlights[:description]&.join('...') || Util.extract_content(obj.description)[0..300].sub!(atta_reg, '')
json.description highlights[:description]&.join('...') || Util.extract_content(obj.description)[0..300]&.sub!(atta_reg, '')
json.content highlights
json.level level_to_s(obj.trainee)

Loading…
Cancel
Save