Compare commits

..

No commits in common. "7375a12c91110352ca3ba4a897f74de4f34f7bde" and "45a3517060bcf25c0caef898b2c417e3c87f2b0a" have entirely different histories.

2 changed files with 6 additions and 4 deletions

View file

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

View file

@ -308,14 +308,15 @@ 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
) || href === 'index')
/[useandom\-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict]{21}/.test(
href,
)
) {
return {
id: href,