@readme/markdown 7.6.0 → 7.6.1

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
@@ -65483,6 +65483,25 @@ const tablesToJsx = () => tree => {
65483
65483
  };
65484
65484
  /* harmony default export */ const tables_to_jsx = (tablesToJsx);
65485
65485
 
65486
+ ;// CONCATENATED MODULE: ./processor/transform/compatability.ts
65487
+
65488
+ const strongTest = (node) => ['emphasis', 'strong'].includes(node.type);
65489
+ const compatibilityTransfomer = () => tree => {
65490
+ const trimEmphasis = (node) => {
65491
+ visit(node, 'text', child => {
65492
+ child.value = child.value.trim();
65493
+ return EXIT;
65494
+ });
65495
+ return node;
65496
+ };
65497
+ visit(tree, strongTest, node => {
65498
+ trimEmphasis(node);
65499
+ return SKIP;
65500
+ });
65501
+ return tree;
65502
+ };
65503
+ /* harmony default export */ const compatability = (compatibilityTransfomer);
65504
+
65486
65505
  ;// CONCATENATED MODULE: ./processor/transform/index.ts
65487
65506
 
65488
65507
 
@@ -65496,6 +65515,7 @@ const tablesToJsx = () => tree => {
65496
65515
 
65497
65516
 
65498
65517
 
65518
+
65499
65519
  /* harmony default export */ const transform = ([callouts, code_tabs, transform_embeds, transform_images, gemoji_]);
65500
65520
 
65501
65521
  ;// CONCATENATED MODULE: ./node_modules/rehype-slug/node_modules/github-slugger/regex.js
@@ -94022,6 +94042,7 @@ const mdx_mdx = (tree, _a = {}) => {
94022
94042
  .use(div)
94023
94043
  .use(readme_to_mdx)
94024
94044
  .use(tables_to_jsx)
94045
+ .use(compatability)
94025
94046
  .use(processor_compile)
94026
94047
  .use(remarkStringify, opts);
94027
94048
  return processor.stringify(processor.runSync(tree));
package/dist/main.node.js CHANGED
@@ -66470,6 +66470,25 @@ const tablesToJsx = () => tree => {
66470
66470
  };
66471
66471
  /* harmony default export */ const tables_to_jsx = (tablesToJsx);
66472
66472
 
66473
+ ;// CONCATENATED MODULE: ./processor/transform/compatability.ts
66474
+
66475
+ const strongTest = (node) => ['emphasis', 'strong'].includes(node.type);
66476
+ const compatibilityTransfomer = () => tree => {
66477
+ const trimEmphasis = (node) => {
66478
+ visit(node, 'text', child => {
66479
+ child.value = child.value.trim();
66480
+ return EXIT;
66481
+ });
66482
+ return node;
66483
+ };
66484
+ visit(tree, strongTest, node => {
66485
+ trimEmphasis(node);
66486
+ return SKIP;
66487
+ });
66488
+ return tree;
66489
+ };
66490
+ /* harmony default export */ const compatability = (compatibilityTransfomer);
66491
+
66473
66492
  ;// CONCATENATED MODULE: ./processor/transform/index.ts
66474
66493
 
66475
66494
 
@@ -66483,6 +66502,7 @@ const tablesToJsx = () => tree => {
66483
66502
 
66484
66503
 
66485
66504
 
66505
+
66486
66506
  /* harmony default export */ const transform = ([callouts, code_tabs, transform_embeds, transform_images, gemoji_]);
66487
66507
 
66488
66508
  ;// CONCATENATED MODULE: ./node_modules/rehype-slug/node_modules/github-slugger/regex.js
@@ -95009,6 +95029,7 @@ const mdx_mdx = (tree, _a = {}) => {
95009
95029
  .use(transform_div)
95010
95030
  .use(readme_to_mdx)
95011
95031
  .use(tables_to_jsx)
95032
+ .use(compatability)
95012
95033
  .use(processor_compile)
95013
95034
  .use(remarkStringify, opts);
95014
95035
  return processor.stringify(processor.runSync(tree));
@@ -0,0 +1,3 @@
1
+ import { Transform } from 'mdast-util-from-markdown';
2
+ declare const compatibilityTransfomer: () => Transform;
3
+ export default compatibilityTransfomer;
@@ -4,6 +4,7 @@ import readmeComponentsTransformer from './readme-components';
4
4
  import readmeToMdx from './readme-to-mdx';
5
5
  import variablesTransformer from './variables';
6
6
  import tablesToJsx from './tables-to-jsx';
7
- export { divTransformer, readmeComponentsTransformer, readmeToMdx, injectComponents, variablesTransformer, tablesToJsx, };
7
+ import compatabilityTransfomer from './compatability';
8
+ export { compatabilityTransfomer, divTransformer, readmeComponentsTransformer, readmeToMdx, injectComponents, variablesTransformer, tablesToJsx, };
8
9
  declare const _default: (() => (tree: any) => void)[];
9
10
  export default _default;
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": "7.6.0",
5
+ "version": "7.6.1",
6
6
  "main": "dist/main.node.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "browser": "dist/main.js",