rme 0.0.75 → 0.1.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -4578,7 +4578,7 @@ function isHtmlBlockToken(t3) {
4578
4578
  var rule2 = (state) => {
4579
4579
  const edited = false;
4580
4580
  const tokens = state.tokens;
4581
- const tokensLength = tokens.length;
4581
+ let tokensLength = tokens.length;
4582
4582
  for (let i = 0; i <= tokensLength - 1; i++) {
4583
4583
  const curToken = tokens[i];
4584
4584
  if (isInlineToken2(curToken)) {
@@ -4608,7 +4608,10 @@ var rule2 = (state) => {
4608
4608
  newTokens.push(newToken);
4609
4609
  childs = [];
4610
4610
  }
4611
- tokens.splice(i, 1, ...newTokens);
4611
+ if (curToken.children && newTokens.length > 0) {
4612
+ tokens.splice(i, 1, ...newTokens);
4613
+ tokensLength += newTokens.length - 1;
4614
+ }
4612
4615
  } else if (isHtmlBlockToken(curToken)) {
4613
4616
  const tag = getTagName(curToken.content);
4614
4617
  if (isSingleNode(curToken.content) && needSplitInlineHtmlTokenTags.includes(tag)) {
@@ -8567,6 +8570,7 @@ var ErrorBoundary = class extends React2.Component {
8567
8570
  }
8568
8571
  render() {
8569
8572
  if (this.state.hasError) {
8573
+ console.error(this.props.error);
8570
8574
  return /* @__PURE__ */ jsxs2(Fragment4, { children: [
8571
8575
  /* @__PURE__ */ jsx5(Title, { "data-testid": "editor_error", children: "Sorry, something went wrong!" }),
8572
8576
  /* @__PURE__ */ jsx5("p", { children: String(this.props.error) })
@@ -18037,13 +18041,6 @@ var HTMLInlineView = class {
18037
18041
  }
18038
18042
  let content = this._innerView?.state.doc.textContent || this._node.attrs?.htmlText || "";
18039
18043
  let texString = content.trim();
18040
- if (texString.length < 1) {
18041
- while (this._htmlRenderElt.firstChild) {
18042
- this._htmlRenderElt.firstChild.remove();
18043
- }
18044
- return;
18045
- } else {
18046
- }
18047
18044
  try {
18048
18045
  while (this._htmlRenderElt.firstChild) {
18049
18046
  this._htmlRenderElt.firstChild.remove();
@@ -18069,12 +18066,9 @@ var HTMLInlineView = class {
18069
18066
  }
18070
18067
  if (this._htmlRenderElt) {
18071
18068
  this.dom.append(this._htmlRenderElt);
18072
- this._htmlRenderElt.classList.remove("node-hide");
18073
- this._htmlRenderElt.classList.add("inline-node-show");
18074
18069
  if (preview) {
18075
18070
  this._htmlRenderElt.classList.add("inline-html-preview");
18076
18071
  }
18077
- this._htmlRenderElt.innerHTML = texString;
18078
18072
  }
18079
18073
  } catch (err) {
18080
18074
  console.error(err);