|
|
@ -11,8 +11,8 @@ json.results do
|
|
|
|
reg = /^[,。?:;‘’!“”—……、]/
|
|
|
|
reg = /^[,。?:;‘’!“”—……、]/
|
|
|
|
# 附件的替换
|
|
|
|
# 附件的替换
|
|
|
|
atta_reg = /!\[\]\(\/api\/attachments\/\d+\)/
|
|
|
|
atta_reg = /!\[\]\(\/api\/attachments\/\d+\)/
|
|
|
|
highlights[:description]&.first&.sub!(reg, '').sub!(atta_reg, '')
|
|
|
|
highlights[:description]&.first&.sub!(reg, '')&.sub!(atta_reg, '')
|
|
|
|
highlights[:content]&.first&.sub!(reg, '').sub!(atta_reg, '')
|
|
|
|
highlights[:content]&.first&.sub!(reg, '')&.sub!(atta_reg, '')
|
|
|
|
|
|
|
|
|
|
|
|
json.content highlights
|
|
|
|
json.content highlights
|
|
|
|
end
|
|
|
|
end
|
|
|
|