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]",
priority: 100,
// TODO: untested
getAttrs(dom) {
dom = dom as HTMLElement;
const href = dom.getAttribute("href");
if (
href &&
/^[useandom\-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict]{21}$/.test(
href,
)
(/^[useandom\-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict]{21}$/.test(
href
) || href === 'index')
) {
return {
id: href,