fix: parsear index como link interno
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Cat /dev/Nulo 2023-09-05 19:09:23 -03:00
parent cd39e1ea52
commit 7375a12c91

View file

@ -308,15 +308,14 @@ export const schema = new Schema({
{ {
tag: "a[href]", tag: "a[href]",
priority: 100, priority: 100,
// TODO: untested
getAttrs(dom) { getAttrs(dom) {
dom = dom as HTMLElement; dom = dom as HTMLElement;
const href = dom.getAttribute("href"); const href = dom.getAttribute("href");
if ( if (
href && href &&
/^[useandom\-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict]{21}$/.test( (/^[useandom\-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict]{21}$/.test(
href, href
) ) || href === 'index')
) { ) {
return { return {
id: href, id: href,