@readme/markdown 11.11.0 → 11.12.0

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/main.js CHANGED
@@ -93676,6 +93676,10 @@ const parseInline = (text) => {
93676
93676
  if (!text.trim())
93677
93677
  return [{ type: 'text', value: '' }];
93678
93678
  const tree = cellParser.runSync(cellParser.parse(text));
93679
+ // If there are multiple block-level nodes, keep them as-is to preserve the document structure and spacing
93680
+ if (tree.children.length > 1) {
93681
+ return tree.children;
93682
+ }
93679
93683
  return tree.children.flatMap(n =>
93680
93684
  // This unwraps the extra p node that might appear & wrapping the content
93681
93685
  n.type === 'paragraph' && 'children' in n ? n.children : [n]);
@@ -93898,6 +93902,25 @@ function parseMagicBlock(raw, options = {}) {
93898
93902
  }, json),
93899
93903
  ];
93900
93904
  }
93905
+ // Recipe/TutorialTile: renders as Recipe component
93906
+ case 'recipe':
93907
+ case 'tutorial-tile': {
93908
+ const recipeJson = json;
93909
+ if (!recipeJson.slug || !recipeJson.title)
93910
+ return [];
93911
+ // Create mdxJsxFlowElement directly for mdxish flow
93912
+ // Note: Don't wrap in pinned blocks for mdxish - rehypeMdxishComponents handles component resolution
93913
+ // The node structure matches what mdxishComponentBlocks creates for JSX tags
93914
+ const recipeNode = {
93915
+ type: 'mdxJsxFlowElement',
93916
+ name: 'Recipe',
93917
+ attributes: toAttributes(recipeJson, ['slug', 'title']),
93918
+ children: [],
93919
+ // Position is optional but helps with debugging
93920
+ position: undefined,
93921
+ };
93922
+ return [recipeNode];
93923
+ }
93901
93924
  // Unknown block types: render as generic div with JSON properties
93902
93925
  default: {
93903
93926
  const text = json.text || json.html || '';
package/dist/main.node.js CHANGED
@@ -113880,6 +113880,10 @@ const parseInline = (text) => {
113880
113880
  if (!text.trim())
113881
113881
  return [{ type: 'text', value: '' }];
113882
113882
  const tree = cellParser.runSync(cellParser.parse(text));
113883
+ // If there are multiple block-level nodes, keep them as-is to preserve the document structure and spacing
113884
+ if (tree.children.length > 1) {
113885
+ return tree.children;
113886
+ }
113883
113887
  return tree.children.flatMap(n =>
113884
113888
  // This unwraps the extra p node that might appear & wrapping the content
113885
113889
  n.type === 'paragraph' && 'children' in n ? n.children : [n]);
@@ -114102,6 +114106,25 @@ function parseMagicBlock(raw, options = {}) {
114102
114106
  }, json),
114103
114107
  ];
114104
114108
  }
114109
+ // Recipe/TutorialTile: renders as Recipe component
114110
+ case 'recipe':
114111
+ case 'tutorial-tile': {
114112
+ const recipeJson = json;
114113
+ if (!recipeJson.slug || !recipeJson.title)
114114
+ return [];
114115
+ // Create mdxJsxFlowElement directly for mdxish flow
114116
+ // Note: Don't wrap in pinned blocks for mdxish - rehypeMdxishComponents handles component resolution
114117
+ // The node structure matches what mdxishComponentBlocks creates for JSX tags
114118
+ const recipeNode = {
114119
+ type: 'mdxJsxFlowElement',
114120
+ name: 'Recipe',
114121
+ attributes: toAttributes(recipeJson, ['slug', 'title']),
114122
+ children: [],
114123
+ // Position is optional but helps with debugging
114124
+ position: undefined,
114125
+ };
114126
+ return [recipeNode];
114127
+ }
114105
114128
  // Unknown block types: render as generic div with JSON properties
114106
114129
  default: {
114107
114130
  const text = json.text || json.html || '';