@etrepum/lexical-builder-markdown 0.0.26 → 0.0.27-nightly.20240627.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +10 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -3,9 +3,9 @@ import { ELEMENT_TRANSFORMERS as it, TEXT_FORMAT_TRANSFORMERS as ct, TEXT_MATCH_
|
|
3
3
|
import { $createCodeNode as at, $isCodeNode as ft } from "@lexical/code";
|
4
4
|
import { $isListNode as B, $isListItemNode as ut } from "@lexical/list";
|
5
5
|
import { $isQuoteNode as gt } from "@lexical/rich-text";
|
6
|
-
import { $findMatchingParent as dt, IS_SAFARI as O, IS_IOS as A, IS_APPLE_WEBKIT as
|
6
|
+
import { $findMatchingParent as dt, IS_SAFARI as O, IS_IOS as A, IS_APPLE_WEBKIT as y } from "@lexical/utils";
|
7
7
|
import { $getSelection as N, $setSelection as H, $isParagraphNode as Q, $isTextNode as x, $createParagraphNode as V, $isElementNode as E, $createTextNode as Y, $createLineBreakNode as pt, $isRootOrShadowRoot as J, $getRoot as mt, $isDecoratorNode as Z, $isLineBreakNode as tt, $isRangeSelection as v, $createRangeSelection as ht } from "lexical";
|
8
|
-
function
|
8
|
+
function L(t, o) {
|
9
9
|
const r = {};
|
10
10
|
for (const e of t) {
|
11
11
|
const i = o(e);
|
@@ -204,7 +204,7 @@ function $t(t) {
|
|
204
204
|
const { tag: c } = n;
|
205
205
|
o[c] = n;
|
206
206
|
const s = c.replace(/(\*|\^|\+)/g, "\\$1");
|
207
|
-
e.push(s), O || A ||
|
207
|
+
e.push(s), O || A || y ? r[c] = new RegExp(
|
208
208
|
`(${s})(?![${s}\\s])(.*?[^${s}\\s])${s}(?!${s})`
|
209
209
|
) : r[c] = new RegExp(
|
210
210
|
`(?<![\\\\${s}])(${s})((\\\\${s})?.*?[^${s}\\s](\\\\${s})?)((?<!\\\\)|(?<=\\\\\\\\))(${s})(?![\\\\${s}])`
|
@@ -215,7 +215,7 @@ function $t(t) {
|
|
215
215
|
fullMatchRegExpByTag: r,
|
216
216
|
// Reg exp to find opening tags
|
217
217
|
openTagsRegExp: new RegExp(
|
218
|
-
(O || A ||
|
218
|
+
(O || A || y ? "" : `${i}`) + "(" + e.join("|") + ")",
|
219
219
|
"g"
|
220
220
|
),
|
221
221
|
transformersByTag: o
|
@@ -479,10 +479,10 @@ function nt(t, o, r, e, i) {
|
|
479
479
|
return !0;
|
480
480
|
}
|
481
481
|
function Ft(t, o) {
|
482
|
-
const r =
|
482
|
+
const r = L(
|
483
483
|
o.textFormat,
|
484
484
|
({ tag: n }) => n[n.length - 1]
|
485
|
-
), e =
|
485
|
+
), e = L(
|
486
486
|
o.textMatch,
|
487
487
|
({ trigger: n }) => n
|
488
488
|
), i = (n, c, s) => {
|
@@ -518,7 +518,7 @@ function Ft(t, o) {
|
|
518
518
|
}
|
519
519
|
);
|
520
520
|
}
|
521
|
-
const
|
521
|
+
const yt = G({
|
522
522
|
name: "@etrepum/lexical-builder-markdown/MarkdownShortcuts",
|
523
523
|
dependencies: [W],
|
524
524
|
config: U({
|
@@ -540,9 +540,9 @@ const Lt = G({
|
|
540
540
|
() => n(!1)
|
541
541
|
);
|
542
542
|
}
|
543
|
-
}),
|
543
|
+
}), Lt = "0.0.27-nightly.20240627.0";
|
544
544
|
export {
|
545
|
-
|
545
|
+
yt as MarkdownShortcutsPlan,
|
546
546
|
W as MarkdownTransformersPlan,
|
547
|
-
|
547
|
+
Lt as PACKAGE_VERSION
|
548
548
|
};
|