@readme/markdown 11.3.0 → 11.4.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
@@ -87722,6 +87722,17 @@ const migrateCallouts = () => (tree) => {
87722
87722
  };
87723
87723
  /* harmony default export */ const migrate_callouts = (migrateCallouts);
87724
87724
 
87725
+ ;// ./processor/transform/migrate-html-tags.ts
87726
+
87727
+ // Add more visits to migrate other HTML tags here
87728
+ const migrateHtmlTags = () => (tree) => {
87729
+ // A common issue is that <br> tags are not properly closed
87730
+ visit(tree, 'html', htmlNode => {
87731
+ htmlNode.value = htmlNode.value.replaceAll(/<br(?!\s*\/>)([^>]*?)>/g, '<br$1 />');
87732
+ });
87733
+ };
87734
+ /* harmony default export */ const migrate_html_tags = (migrateHtmlTags);
87735
+
87725
87736
  ;// ./processor/transform/migrate-link-references.ts
87726
87737
 
87727
87738
 
@@ -87744,9 +87755,10 @@ const migrateLinkReferences = () => {
87744
87755
 
87745
87756
 
87746
87757
 
87758
+
87747
87759
  const migrate = (doc, { rdmd }) => {
87748
87760
  const ast = lib_mdastV6(doc, { rdmd });
87749
- return (lib_mdx(ast, { remarkTransformers: [migrate_callouts, migrate_link_references], file: doc })
87761
+ return (lib_mdx(ast, { remarkTransformers: [migrate_callouts, migrate_link_references, migrate_html_tags], file: doc })
87750
87762
  .replaceAll(/&#x20;/g, ' ')
87751
87763
  // @note: I'm not sure what's happening, but I think mdx is converting an
87752
87764
  // 'a' to '&#x61;' as a means of escaping it. I think this helps with
package/dist/main.node.js CHANGED
@@ -107933,6 +107933,17 @@ const migrateCallouts = () => (tree) => {
107933
107933
  };
107934
107934
  /* harmony default export */ const migrate_callouts = (migrateCallouts);
107935
107935
 
107936
+ ;// ./processor/transform/migrate-html-tags.ts
107937
+
107938
+ // Add more visits to migrate other HTML tags here
107939
+ const migrateHtmlTags = () => (tree) => {
107940
+ // A common issue is that <br> tags are not properly closed
107941
+ visit(tree, 'html', htmlNode => {
107942
+ htmlNode.value = htmlNode.value.replaceAll(/<br(?!\s*\/>)([^>]*?)>/g, '<br$1 />');
107943
+ });
107944
+ };
107945
+ /* harmony default export */ const migrate_html_tags = (migrateHtmlTags);
107946
+
107936
107947
  ;// ./processor/transform/migrate-link-references.ts
107937
107948
 
107938
107949
 
@@ -107955,9 +107966,10 @@ const migrateLinkReferences = () => {
107955
107966
 
107956
107967
 
107957
107968
 
107969
+
107958
107970
  const migrate = (doc, { rdmd }) => {
107959
107971
  const ast = lib_mdastV6(doc, { rdmd });
107960
- return (lib_mdx(ast, { remarkTransformers: [migrate_callouts, migrate_link_references], file: doc })
107972
+ return (lib_mdx(ast, { remarkTransformers: [migrate_callouts, migrate_link_references, migrate_html_tags], file: doc })
107961
107973
  .replaceAll(/&#x20;/g, ' ')
107962
107974
  // @note: I'm not sure what's happening, but I think mdx is converting an
107963
107975
  // 'a' to '&#x61;' as a means of escaping it. I think this helps with