@mdxeditor/editor 1.11.4 → 1.11.5

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.
@@ -14,7 +14,7 @@ function exportLexicalTreeToMdast({
14
14
  }) {
15
15
  let unistRoot = null;
16
16
  const referredComponents = /* @__PURE__ */ new Set();
17
- visitors = visitors.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0));
17
+ visitors = visitors.sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0));
18
18
  visit(root, null);
19
19
  function registerReferredComponent(componentName) {
20
20
  referredComponents.add(componentName);
@@ -18,7 +18,7 @@ function importMarkdownToLexical({ root, markdown, visitors, syntaxExtensions, m
18
18
  }
19
19
  function importMdastTreeToLexical({ root, mdastRoot, visitors }) {
20
20
  const formattingMap = /* @__PURE__ */ new WeakMap();
21
- visitors = visitors.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0));
21
+ visitors = visitors.sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0));
22
22
  function visitChildren(mdastNode, lexicalParent) {
23
23
  if (!isParent(mdastNode)) {
24
24
  throw new Error("Attempting to visit children of a non-parent");
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "private": false,
10
10
  "sideEffects": false,
11
11
  "type": "module",
12
- "version": "1.11.4",
12
+ "version": "1.11.5",
13
13
  "description": "React component for rich text markdown editing",
14
14
  "scripts": {
15
15
  "build": "vite build",