Compare commits

..

3 commits

Author SHA1 Message Date
7375a12c91 fix: parsear index como link interno
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-09-05 19:09:23 -03:00
cd39e1ea52 fix: arreglar parseo de internal links 2023-09-05 19:08:38 -03:00
435cccfb1c limpiar EditLinkMenu 2023-09-03 22:47:23 -03:00
2 changed files with 4 additions and 6 deletions

View file

@ -4,12 +4,11 @@
import { getFirstMarkInSelection } from "../ps-utils";
import { readable, type Writable } from "svelte/store";
import { nanoid } from "nanoid";
import { linkFloatingUi, selectionFloatingUi } from "./floatingUi";
import { selectionFloatingUi } from "./floatingUi";
import {
autoPlacement,
shift,
offset,
type ComputePositionConfig,
} from "@floating-ui/dom";
export let state: EditorState;

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,