Compare commits
No commits in common. "7375a12c91110352ca3ba4a897f74de4f34f7bde" and "45a3517060bcf25c0caef898b2c417e3c87f2b0a" have entirely different histories.
7375a12c91
...
45a3517060
2 changed files with 6 additions and 4 deletions
|
@ -4,11 +4,12 @@
|
||||||
import { getFirstMarkInSelection } from "../ps-utils";
|
import { getFirstMarkInSelection } from "../ps-utils";
|
||||||
import { readable, type Writable } from "svelte/store";
|
import { readable, type Writable } from "svelte/store";
|
||||||
import { nanoid } from "nanoid";
|
import { nanoid } from "nanoid";
|
||||||
import { selectionFloatingUi } from "./floatingUi";
|
import { linkFloatingUi, selectionFloatingUi } from "./floatingUi";
|
||||||
import {
|
import {
|
||||||
autoPlacement,
|
autoPlacement,
|
||||||
shift,
|
shift,
|
||||||
offset,
|
offset,
|
||||||
|
type ComputePositionConfig,
|
||||||
} from "@floating-ui/dom";
|
} from "@floating-ui/dom";
|
||||||
|
|
||||||
export let state: EditorState;
|
export let state: EditorState;
|
||||||
|
|
|
@ -308,14 +308,15 @@ 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,
|
||||||
|
|
Loading…
Reference in a new issue