@tinacms/mdx 0.61.2 → 0.61.3

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.
Files changed (2) hide show
  1. package/dist/index.js +18 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -244953,7 +244953,7 @@ var replaceLinksWithTextNodes = (content3) => {
244953
244953
  type: "link",
244954
244954
  url: item.url,
244955
244955
  title: item.title,
244956
- children: [text4({ text: a.value })]
244956
+ children: [a]
244957
244957
  };
244958
244958
  }
244959
244959
  }));
@@ -245013,12 +245013,24 @@ var text4 = (content3) => {
245013
245013
  };
245014
245014
  };
245015
245015
  var eat2 = (c, field, imageCallback) => {
245016
+ var _a, _b;
245016
245017
  const content3 = replaceLinksWithTextNodes(c);
245017
245018
  const first = content3[0];
245018
245019
  if (!first) {
245019
245020
  return [];
245020
245021
  }
245021
245022
  if (first && (first == null ? void 0 : first.type) !== "text") {
245023
+ if (first.type === "a") {
245024
+ return [
245025
+ {
245026
+ type: "link",
245027
+ url: first.url,
245028
+ title: first.title,
245029
+ children: eat2(first.children, field, imageCallback)
245030
+ },
245031
+ ...eat2(content3.slice(1), field, imageCallback)
245032
+ ];
245033
+ }
245022
245034
  return [
245023
245035
  inlineElementExceptLink(first, field, imageCallback),
245024
245036
  ...eat2(content3.slice(1), field, imageCallback)
@@ -245074,11 +245086,12 @@ var eat2 = (c, field, imageCallback) => {
245074
245086
  if (nonMatchingSiblingIndex) {
245075
245087
  throw new Error(`Marks inside inline code are not supported`);
245076
245088
  }
245089
+ const node = {
245090
+ type: markToProcess,
245091
+ value: first.text
245092
+ };
245077
245093
  return [
245078
- {
245079
- type: markToProcess,
245080
- value: first.text
245081
- },
245094
+ (_b = (_a = first.linkifyTextNode) == null ? void 0 : _a.call(first, node)) != null ? _b : node,
245082
245095
  ...eat2(content3.slice(nonMatchingSiblingIndex + 1), field, imageCallback)
245083
245096
  ];
245084
245097
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/mdx",
3
- "version": "0.61.2",
3
+ "version": "0.61.3",
4
4
  "typings": "dist/index.d.ts",
5
5
  "main": "dist/index.js",
6
6
  "files": [