tiptap-markdown-react 0.14.3 → 0.14.4

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.js CHANGED
@@ -1887,7 +1887,7 @@ function MarkdownPreview({
1887
1887
  const strip = () => {
1888
1888
  const { doc, tr } = editor.state;
1889
1889
  const last = doc.lastChild;
1890
- if (doc.childCount > 1 && (last == null ? void 0 : last.type.name) === "paragraph" && last.content.size === 0) {
1890
+ if (doc.childCount > 1 && (last == null ? void 0 : last.type.name) === "paragraph" && last.textContent.trim() === "") {
1891
1891
  editor.view.dispatch(
1892
1892
  tr.delete(doc.content.size - last.nodeSize, doc.content.size)
1893
1893
  );