fix(plugins): searx and html2text wrap

This commit is contained in:
Artemy 2024-05-14 15:52:22 +03:00
parent 1d47c66f7d
commit 752939d099
3 changed files with 10 additions and 7 deletions

View File

@ -6,8 +6,8 @@ export function PageFooter({
next,
}: {
page: number;
previous: string | false;
next: string | false;
previous: string | null;
next: string | null;
}) {
return (
<>

View File

@ -15,14 +15,14 @@ async function search(
const search = ro.q.search;
const page = parseInt(ro.q.pageno || '1');
let previous: string | false;
let next: string | false;
let previous: string | null;
let next: string | null;
if (ro.q.pageno) {
previous = ro.reverse({ search, pageno: page - 1 });
next = ro.reverse({ search, pageno: page + 1 });
previous = ro.reverse({ search, pageno: page - 1 }) || null;
next = ro.reverse({ search, pageno: page + 1 }) || null;
} else {
previous = false;
previous = null;
next = `/search?q=${search}&pageno=${page + 1}`;
}

View File

@ -11,5 +11,8 @@ export const engineList = [
import { compile } from 'html-to-text';
export const html2text = compile({
longWordSplit: {
forceWrapOnLimit: true,
},
selectors: [{ selector: 'img', format: 'skip' }],
});