@readme/markdown 6.75.0-beta.75 → 6.75.0-beta.76

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
@@ -65265,7 +65265,10 @@ const alignToStyle = (align) => {
65265
65265
  const visitor = (table, index, parent) => {
65266
65266
  let hasFlowContent = false;
65267
65267
  const tableCellVisitor = (cell) => {
65268
- if (!phrasing(cell.children[0])) {
65268
+ const content = cell.children.length === 1 && cell.children[0].type === 'paragraph'
65269
+ ? cell.children[0].children[0]
65270
+ : cell.children[0];
65271
+ if (!phrasing(content)) {
65269
65272
  hasFlowContent = true;
65270
65273
  return EXIT;
65271
65274
  }
@@ -65277,8 +65280,10 @@ const visitor = (table, index, parent) => {
65277
65280
  });
65278
65281
  };
65279
65282
  visit(table, 'tableCell', tableCellVisitor);
65280
- if (!hasFlowContent)
65283
+ if (!hasFlowContent) {
65284
+ table.type = 'table';
65281
65285
  return;
65286
+ }
65282
65287
  const styles = table.align.map(alignToStyle);
65283
65288
  const head = {
65284
65289
  type: 'mdxJsxFlowElement',
@@ -65320,8 +65325,9 @@ const visitor = (table, index, parent) => {
65320
65325
  // @ts-ignore
65321
65326
  parent.children[index] = jsx;
65322
65327
  };
65328
+ const isTable = (node) => ['table', 'tableau'].includes(node.type);
65323
65329
  const tablesToJsx = () => tree => {
65324
- visit(tree, 'table', visitor);
65330
+ visit(tree, isTable, visitor);
65325
65331
  return tree;
65326
65332
  };
65327
65333
  /* harmony default export */ const tables_to_jsx = (tablesToJsx);
package/dist/main.node.js CHANGED
@@ -66252,7 +66252,10 @@ const alignToStyle = (align) => {
66252
66252
  const visitor = (table, index, parent) => {
66253
66253
  let hasFlowContent = false;
66254
66254
  const tableCellVisitor = (cell) => {
66255
- if (!phrasing(cell.children[0])) {
66255
+ const content = cell.children.length === 1 && cell.children[0].type === 'paragraph'
66256
+ ? cell.children[0].children[0]
66257
+ : cell.children[0];
66258
+ if (!phrasing(content)) {
66256
66259
  hasFlowContent = true;
66257
66260
  return EXIT;
66258
66261
  }
@@ -66264,8 +66267,10 @@ const visitor = (table, index, parent) => {
66264
66267
  });
66265
66268
  };
66266
66269
  visit(table, 'tableCell', tableCellVisitor);
66267
- if (!hasFlowContent)
66270
+ if (!hasFlowContent) {
66271
+ table.type = 'table';
66268
66272
  return;
66273
+ }
66269
66274
  const styles = table.align.map(alignToStyle);
66270
66275
  const head = {
66271
66276
  type: 'mdxJsxFlowElement',
@@ -66307,8 +66312,9 @@ const visitor = (table, index, parent) => {
66307
66312
  // @ts-ignore
66308
66313
  parent.children[index] = jsx;
66309
66314
  };
66315
+ const isTable = (node) => ['table', 'tableau'].includes(node.type);
66310
66316
  const tablesToJsx = () => tree => {
66311
- visit(tree, 'table', visitor);
66317
+ visit(tree, isTable, visitor);
66312
66318
  return tree;
66313
66319
  };
66314
66320
  /* harmony default export */ const tables_to_jsx = (tablesToJsx);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@readme/markdown",
3
3
  "description": "ReadMe's React-based Markdown parser",
4
4
  "author": "Rafe Goldberg <rafe@readme.io>",
5
- "version": "6.75.0-beta.75",
5
+ "version": "6.75.0-beta.76",
6
6
  "main": "dist/main.node.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "browser": "dist/main.js",