Compare commits
3 commits
45a3517060
...
7375a12c91
Author | SHA1 | Date | |
---|---|---|---|
7375a12c91 | |||
cd39e1ea52 | |||
435cccfb1c |
2 changed files with 4 additions and 6 deletions
|
@ -4,12 +4,11 @@
|
||||||
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 { linkFloatingUi, selectionFloatingUi } from "./floatingUi";
|
import { 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,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,
|
||||||
|
|
Loading…
Reference in a new issue