Update zhihu-search.ts

This commit is contained in:
huqi 2022-03-10 13:53:42 +08:00 committed by GitHub
parent ba133f1c8f
commit d2b5391b46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,7 +33,7 @@ if (await exists(fullPath)) {
const wordsAll = mergeWords(words, wordsAlreadyDownload);
export const zhihuSearchData = wordsAll.map((x) => {
x.url = `https://www.zhihu.com/search?q=${x.query}`;
x.url = `https://www.zhihu.com/search?q=${x.query.replace(/(^\s+)|(\s+$)|\s+/g,'%20')}`;
return x;
});