@readme/markdown 11.2.0 → 11.2.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.node.js CHANGED
@@ -21824,11 +21824,15 @@ const Image = (Props) => {
21824
21824
  external_react_.createElement("span", { "aria-label": alt, className: `img lightbox ${lightbox ? 'open' : 'closed'}`, onClick: toggle, onKeyDown: handleKeyDown, role: 'button', tabIndex: 0 },
21825
21825
  external_react_.createElement("span", { className: "lightbox-inner" },
21826
21826
  external_react_.createElement("img", { alt: alt, className: `img img-align-center ${border ? 'border' : ''}`, height: height, loading: lazy ? 'lazy' : 'eager', src: src, title: title, width: width }),
21827
- external_react_.createElement("figcaption", null, children || caption)))));
21827
+ external_react_.createElement("figcaption", null, children || caption))),
21828
+ lightbox && (external_react_.createElement("button", { "aria-label": "Minimize image", className: "lightbox-close", type: "button" },
21829
+ external_react_.createElement("i", { "aria-hidden": "true", className: "fa-solid fa-xmark" })))));
21828
21830
  }
21829
21831
  return (external_react_.createElement("span", { "aria-label": `${lightbox ? 'Collapse image' : 'Expand image'}`, className: `img lightbox ${lightbox ? 'open' : 'closed'}`, onClick: toggle, onKeyDown: handleKeyDown, role: 'button', tabIndex: 0 },
21830
21832
  external_react_.createElement("span", { className: "lightbox-inner" },
21831
- external_react_.createElement("img", { alt: alt, className: `img ${align ? `img-align-${align}` : ''} ${border ? 'border' : ''}`, height: height, loading: lazy ? 'lazy' : 'eager', src: src, title: title, width: width }))));
21833
+ external_react_.createElement("img", { alt: alt, className: `img ${align ? `img-align-${align}` : ''} ${border ? 'border' : ''}`, height: height, loading: lazy ? 'lazy' : 'eager', src: src, title: title, width: width })),
21834
+ lightbox && (external_react_.createElement("button", { "aria-label": "Minimize image", className: "lightbox-close", type: "button" },
21835
+ external_react_.createElement("i", { "aria-hidden": "true", className: "fa-solid fa-xmark" })))));
21832
21836
  };
21833
21837
  /* harmony default export */ const components_Image = (Image);
21834
21838
 
@@ -107874,6 +107878,22 @@ function compilers() {
107874
107878
  }
107875
107879
  /* harmony default export */ const processor_compile = (compilers);
107876
107880
 
107881
+ ;// ./processor/transform/escape-pipes-in-tables.ts
107882
+
107883
+ const escapePipesInTables = () => tree => {
107884
+ visit(tree, 'table', tableNode => {
107885
+ visit(tableNode, leaf => {
107886
+ if (!('value' in leaf))
107887
+ return;
107888
+ if (leaf.value.match(/|/g)) {
107889
+ // escape only unescaped pipes
107890
+ leaf.value = leaf.value.replaceAll(/(?<!\\(\\\\)*)\|/g, '\\|');
107891
+ }
107892
+ });
107893
+ return SKIP;
107894
+ });
107895
+ };
107896
+
107877
107897
  ;// ./lib/mdx.ts
107878
107898
 
107879
107899
 
@@ -107882,6 +107902,7 @@ function compilers() {
107882
107902
 
107883
107903
 
107884
107904
 
107905
+
107885
107906
  const mdx_mdx = (tree, { hast = false, remarkTransformers = [], file, ...opts } = {}) => {
107886
107907
  const processor = unified()
107887
107908
  .use(hast ? rehypeRemark : undefined)
@@ -107892,6 +107913,7 @@ const mdx_mdx = (tree, { hast = false, remarkTransformers = [], file, ...opts }
107892
107913
  .use(readme_to_mdx)
107893
107914
  .use(tables_to_jsx)
107894
107915
  .use(compatability)
107916
+ .use(escapePipesInTables)
107895
107917
  .use(processor_compile)
107896
107918
  .use(remarkStringify, opts);
107897
107919
  // @ts-expect-error - @todo: coerce the processor and tree to the correct