mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
d
This commit is contained in:
parent
f951b48e41
commit
8f16390022
2 changed files with 6 additions and 1043 deletions
1044
searx/webapp.py
1044
searx/webapp.py
File diff suppressed because one or more lines are too long
|
@ -1291,6 +1291,11 @@ function modal_open(url, num)
|
||||||
fulltext = fulltext.replaceAll("\n\n","\n").replaceAll("\n\n","\n");
|
fulltext = fulltext.replaceAll("\n\n","\n").replaceAll("\n\n","\n");
|
||||||
const delimiter = /[?!;\?\n。;!………]/g
|
const delimiter = /[?!;\?\n。;!………]/g
|
||||||
fulltext = fulltext.split(delimiter);
|
fulltext = fulltext.split(delimiter);
|
||||||
|
fulltext = fulltext.filter((item) => {
|
||||||
|
// 使用正则表达式匹配仅由数字、逗号和空格组成的字符串
|
||||||
|
const regex = /^[0-9,\s]+$/;
|
||||||
|
return !regex.test(item);
|
||||||
|
});
|
||||||
fulltext = fulltext.filter(function(item) {
|
fulltext = fulltext.filter(function(item) {
|
||||||
return item && item.trim(); // 去掉空值和空格
|
return item && item.trim(); // 去掉空值和空格
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue