@mintlify/cli 4.0.1455 → 4.0.1456

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.
@@ -1605,7 +1605,7 @@ function handleFlowJsxInner(node, ctx, transformNode2, mapJsxChildren2) {
1605
1605
  content: mapJsxChildren2(node, ctx)
1606
1606
  };
1607
1607
  }
1608
- if (node.name === "table") {
1608
+ if (node.name === "table" && !hasSpannedCell(node)) {
1609
1609
  return handleHtmlTable(node, ctx, transformNode2, mapJsxChildren2);
1610
1610
  }
1611
1611
  if (HTML_ELEMENTS.has(node.name)) {
@@ -1840,6 +1840,13 @@ function handleTree(node) {
1840
1840
  attrs: Object.assign({ treeData: parseTreeChildren(node) }, extraTreeAttrs)
1841
1841
  };
1842
1842
  }
1843
+ var CELL_SPAN_ATTRS = /* @__PURE__ */ new Set(["colspan", "colSpan", "rowspan", "rowSpan"]);
1844
+ function hasSpannedCell(node) {
1845
+ if (isTableCellJsxNode(node) && node.attributes.some((a) => a.type === "mdxJsxAttribute" && CELL_SPAN_ATTRS.has(a.name))) {
1846
+ return true;
1847
+ }
1848
+ return "children" in node && node.children.some((c) => hasSpannedCell(c));
1849
+ }
1843
1850
  function handleHtmlTable(node, ctx, transformNode2, mapJsxChildren2) {
1844
1851
  const rows = [];
1845
1852
  for (const child of node.children) {
@@ -2676,7 +2683,8 @@ function convertInlineContent(children, parentMarks, ctx) {
2676
2683
  } else {
2677
2684
  const converted = transformNode(child, ctx);
2678
2685
  const arr = Array.isArray(converted) ? converted : [converted];
2679
- results.push(...arr);
2686
+ const withMarks = child.type === "mdxTextExpression" && parentMarks.length > 0 ? arr.map((n) => Object.assign(Object.assign({}, n), { marks: parentMarks })) : arr;
2687
+ results.push(...withMarks);
2680
2688
  }
2681
2689
  }
2682
2690
  return results;
@@ -10875,6 +10883,11 @@ var FLANKING_DELIMITER_MARKS = ["bold", "italic", "strike"];
10875
10883
  function usesFlanking(mark) {
10876
10884
  return FLANKING_DELIMITER_MARKS.includes(mark.type.name);
10877
10885
  }
10886
+ var MARK_PRESERVING_INLINE = /* @__PURE__ */ new Set([
10887
+ "text",
10888
+ BLOCK_TYPES.inlineImage,
10889
+ BLOCK_TYPES.inlineUnknownTag
10890
+ ]);
10878
10891
  function reorderMarksForLink(marks2, parent, childIndex) {
10879
10892
  if (marks2.length < 2)
10880
10893
  return marks2;
@@ -10884,12 +10897,12 @@ function reorderMarksForLink(marks2, parent, childIndex) {
10884
10897
  let linkEndIndex = childIndex;
10885
10898
  for (let i = childIndex + 1; i < parent.childCount; i++) {
10886
10899
  const sibling = parent.child(i);
10887
- if (sibling.type.name !== "text" || !sibling.marks.some((m) => m.eq(linkMark)))
10900
+ if (!MARK_PRESERVING_INLINE.has(sibling.type.name) || !sibling.marks.some((m) => m.eq(linkMark)))
10888
10901
  break;
10889
10902
  linkEndIndex = i;
10890
10903
  }
10891
10904
  const nextAfterLink = linkEndIndex + 1 < parent.childCount ? parent.child(linkEndIndex + 1) : null;
10892
- const nextMarks = (nextAfterLink === null || nextAfterLink === void 0 ? void 0 : nextAfterLink.type.name) === "text" ? nextAfterLink.marks : [];
10905
+ const nextMarks = nextAfterLink && MARK_PRESERVING_INLINE.has(nextAfterLink.type.name) ? nextAfterLink.marks : [];
10893
10906
  const otherMarks = marks2.filter((m) => !m.eq(linkMark));
10894
10907
  const anyFormattingContinues = otherMarks.some((m) => nextMarks.some((nm) => nm.eq(m)));
10895
10908
  if (anyFormattingContinues)
@@ -10985,10 +10998,15 @@ function renderInline(state, node, renderNode2, inlineRenderers2) {
10985
10998
  }
10986
10999
  } else {
10987
11000
  if (typeName === BLOCK_TYPES.inlineImage) {
10988
- transitionMarks(child.marks);
11001
+ transitionMarks(reorderMarksForLink(child.marks, node, i));
10989
11002
  inlineRenderers2.renderInlineImage(state, child);
10990
11003
  continue;
10991
11004
  }
11005
+ if (typeName === BLOCK_TYPES.inlineUnknownTag) {
11006
+ transitionMarks(reorderMarksForLink(child.marks, node, i));
11007
+ inlineRenderers2.renderUnknownTag(state, child);
11008
+ continue;
11009
+ }
10992
11010
  transitionMarks([]);
10993
11011
  if (typeName === "hardBreak") {
10994
11012
  state.write("<br />");
@@ -11002,8 +11020,6 @@ function renderInline(state, node, renderNode2, inlineRenderers2) {
11002
11020
  if (child.attrs.expression) {
11003
11021
  state.write(`$$${child.attrs.expression}$$`);
11004
11022
  }
11005
- } else if (typeName === BLOCK_TYPES.inlineUnknownTag) {
11006
- inlineRenderers2.renderUnknownTag(state, child);
11007
11023
  } else {
11008
11024
  renderNode2(state, child, node, 0);
11009
11025
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintlify/cli",
3
- "version": "4.0.1455",
3
+ "version": "4.0.1456",
4
4
  "description": "The Mintlify CLI",
5
5
  "engines": {
6
6
  "node": ">=18.0.0"
@@ -86,7 +86,7 @@
86
86
  "keytar": "7.9.0"
87
87
  },
88
88
  "devDependencies": {
89
- "@mintlify/editor": "0.0.345",
89
+ "@mintlify/editor": "0.0.346",
90
90
  "@mintlify/ts-config": "2.0.2",
91
91
  "@tsconfig/recommended": "1.0.2",
92
92
  "@types/detect-port": "1.3.2",
@@ -105,5 +105,5 @@
105
105
  "vitest": "2.1.9",
106
106
  "vitest-mock-process": "1.0.4"
107
107
  },
108
- "gitHead": "ea77e460bd85187783783963dd8b0cde8c6c8cef"
108
+ "gitHead": "6d4fe7b568f4cfeb4766327c5bfbc0fecbfd45cd"
109
109
  }