@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.
Files changed (2) hide show
  1. package/dist/index.js +15 -14
  2. 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
- for (const r of n) {
158
- const i = o.getTextContent().match(r.importRegExp);
159
- if (!i)
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 t = i.index || 0, c = t + i[0].length;
162
- let s, l;
163
- if (t === 0) {
164
- const a = o.splitText(c);
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
- a[0] !== void 0,
167
+ f[0] !== void 0,
167
168
  "importTextMatchTransformers: splitText expected at least one node"
168
- ), [s, o] = a;
169
+ ), [l, o] = f;
169
170
  } else {
170
- const a = o.splitText(t, c);
171
+ const f = o.splitText(c, s);
171
172
  T(
172
- a[1] !== void 0,
173
+ f[1] !== void 0,
173
174
  "importTextMatchTransformers: splitText expected at least two nodes"
174
- ), [, s, l] = a, l && ne(l, n);
175
+ ), [, l, a] = f, a && ne(a, n);
175
176
  }
176
- r.replace(s, i);
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.28";
550
+ }), Ue = "0.0.29";
550
551
  export {
551
552
  ze as MarkdownShortcutsPlan,
552
553
  W as MarkdownTransformersPlan,
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "test": "vitest run",
17
17
  "test:watch": "vitest"
18
18
  },
19
- "version": "0.0.28",
19
+ "version": "0.0.29",
20
20
  "license": "MIT",
21
21
  "repository": {
22
22
  "type": "git",