mirror of
https://github.com/txtdot/txtdot
synced 2024-10-18 14:40:19 +03:00
fix(plugins): searx and html2text wrap
This commit is contained in:
parent
1d47c66f7d
commit
752939d099
@ -6,8 +6,8 @@ export function PageFooter({
|
|||||||
next,
|
next,
|
||||||
}: {
|
}: {
|
||||||
page: number;
|
page: number;
|
||||||
previous: string | false;
|
previous: string | null;
|
||||||
next: string | false;
|
next: string | null;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
@ -15,14 +15,14 @@ async function search(
|
|||||||
const search = ro.q.search;
|
const search = ro.q.search;
|
||||||
const page = parseInt(ro.q.pageno || '1');
|
const page = parseInt(ro.q.pageno || '1');
|
||||||
|
|
||||||
let previous: string | false;
|
let previous: string | null;
|
||||||
let next: string | false;
|
let next: string | null;
|
||||||
|
|
||||||
if (ro.q.pageno) {
|
if (ro.q.pageno) {
|
||||||
previous = ro.reverse({ search, pageno: page - 1 });
|
previous = ro.reverse({ search, pageno: page - 1 }) || null;
|
||||||
next = ro.reverse({ search, pageno: page + 1 });
|
next = ro.reverse({ search, pageno: page + 1 }) || null;
|
||||||
} else {
|
} else {
|
||||||
previous = false;
|
previous = null;
|
||||||
next = `/search?q=${search}&pageno=${page + 1}`;
|
next = `/search?q=${search}&pageno=${page + 1}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,5 +11,8 @@ export const engineList = [
|
|||||||
import { compile } from 'html-to-text';
|
import { compile } from 'html-to-text';
|
||||||
|
|
||||||
export const html2text = compile({
|
export const html2text = compile({
|
||||||
|
longWordSplit: {
|
||||||
|
forceWrapOnLimit: true,
|
||||||
|
},
|
||||||
selectors: [{ selector: 'img', format: 'skip' }],
|
selectors: [{ selector: 'img', format: 'skip' }],
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user