dev_cs
cxt 5 years ago
parent 6eb7f5de4a
commit b53889524c

@ -11,8 +11,8 @@ json.results 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.content highlights
end

Loading…
Cancel
Save