@etrepum/lexical-builder-markdown 0.0.28 → 0.0.29
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +15 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -154,26 +154,27 @@ function E(e, n, o) {
|
|
154
154
|
function ne(e, n) {
|
155
155
|
let o = e;
|
156
156
|
e: for (; o; ) {
|
157
|
-
|
158
|
-
|
159
|
-
|
157
|
+
const r = o.getTextContent();
|
158
|
+
for (const i of n) {
|
159
|
+
const t = r.match(i.importRegExp);
|
160
|
+
if (!t)
|
160
161
|
continue;
|
161
|
-
const
|
162
|
-
let
|
163
|
-
if (
|
164
|
-
const
|
162
|
+
const c = t.index || 0, s = c + t[0].length;
|
163
|
+
let l, a;
|
164
|
+
if (c === 0) {
|
165
|
+
const f = o.splitText(s);
|
165
166
|
T(
|
166
|
-
|
167
|
+
f[0] !== void 0,
|
167
168
|
"importTextMatchTransformers: splitText expected at least one node"
|
168
|
-
), [
|
169
|
+
), [l, o] = f;
|
169
170
|
} else {
|
170
|
-
const
|
171
|
+
const f = o.splitText(c, s);
|
171
172
|
T(
|
172
|
-
|
173
|
+
f[1] !== void 0,
|
173
174
|
"importTextMatchTransformers: splitText expected at least two nodes"
|
174
|
-
), [,
|
175
|
+
), [, l, a] = f, a && ne(a, n);
|
175
176
|
}
|
176
|
-
|
177
|
+
i.replace(l, t);
|
177
178
|
continue e;
|
178
179
|
}
|
179
180
|
break;
|
@@ -546,7 +547,7 @@ const ze = G({
|
|
546
547
|
})
|
547
548
|
);
|
548
549
|
}
|
549
|
-
}), Ue = "0.0.
|
550
|
+
}), Ue = "0.0.29";
|
550
551
|
export {
|
551
552
|
ze as MarkdownShortcutsPlan,
|
552
553
|
W as MarkdownTransformersPlan,
|