@readme/markdown 11.2.1 → 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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
function TableOfContents({ children }: React.PropsWithChildren) {
|
|
3
|
+
function TableOfContents({ children, heading = 'Table of Contents' }: React.PropsWithChildren<{ heading?: string }>) {
|
|
4
4
|
return (
|
|
5
5
|
<nav aria-label="Table of contents" role="navigation">
|
|
6
6
|
<ul className="toc-list">
|
|
@@ -8,7 +8,7 @@ function TableOfContents({ children }: React.PropsWithChildren) {
|
|
|
8
8
|
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
|
|
9
9
|
<a className="tocHeader" href="#">
|
|
10
10
|
<i className="icon icon-text-align-left"></i>
|
|
11
|
-
|
|
11
|
+
{heading}
|
|
12
12
|
</a>
|
|
13
13
|
</li>
|
|
14
14
|
<li className="toc-children">{children}</li>
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare function TableOfContents({ children }: React.PropsWithChildren
|
|
2
|
+
declare function TableOfContents({ children, heading }: React.PropsWithChildren<{
|
|
3
|
+
heading?: string;
|
|
4
|
+
}>): React.JSX.Element;
|
|
3
5
|
export default TableOfContents;
|
package/dist/main.js
CHANGED
|
@@ -9235,13 +9235,13 @@ const Table = (props) => {
|
|
|
9235
9235
|
|
|
9236
9236
|
;// ./components/TableOfContents/index.tsx
|
|
9237
9237
|
|
|
9238
|
-
function TableOfContents({ children }) {
|
|
9238
|
+
function TableOfContents({ children, heading = 'Table of Contents' }) {
|
|
9239
9239
|
return (external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement("nav", { "aria-label": "Table of contents", role: "navigation" },
|
|
9240
9240
|
external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement("ul", { className: "toc-list" },
|
|
9241
9241
|
external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement("li", null,
|
|
9242
9242
|
external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement("a", { className: "tocHeader", href: "#" },
|
|
9243
9243
|
external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement("i", { className: "icon icon-text-align-left" }),
|
|
9244
|
-
|
|
9244
|
+
heading)),
|
|
9245
9245
|
external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement("li", { className: "toc-children" }, children))));
|
|
9246
9246
|
}
|
|
9247
9247
|
/* harmony default export */ const components_TableOfContents = (TableOfContents);
|
|
@@ -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(/ /g, ' ')
|
|
87751
87763
|
// @note: I'm not sure what's happening, but I think mdx is converting an
|
|
87752
87764
|
// 'a' to 'a' as a means of escaping it. I think this helps with
|
|
@@ -87920,8 +87932,8 @@ const run_run = (string, _opts = {}) => {
|
|
|
87920
87932
|
default: (props) => (external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement(contexts, { baseUrl: baseUrl, copyButtons: copyButtons, terms: terms, theme: theme, variables: variables },
|
|
87921
87933
|
external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement(Content, { ...props }))),
|
|
87922
87934
|
toc,
|
|
87923
|
-
Toc: props => Toc ? (external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement(components_TableOfContents,
|
|
87924
|
-
external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement(Toc,
|
|
87935
|
+
Toc: (props) => Toc ? (external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement(components_TableOfContents, { heading: props.heading },
|
|
87936
|
+
external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement(Toc, null))) : null,
|
|
87925
87937
|
stylesheet,
|
|
87926
87938
|
...exports,
|
|
87927
87939
|
};
|
package/dist/main.node.js
CHANGED
|
@@ -21848,13 +21848,13 @@ const Table = (props) => {
|
|
|
21848
21848
|
|
|
21849
21849
|
;// ./components/TableOfContents/index.tsx
|
|
21850
21850
|
|
|
21851
|
-
function TableOfContents({ children }) {
|
|
21851
|
+
function TableOfContents({ children, heading = 'Table of Contents' }) {
|
|
21852
21852
|
return (external_react_default().createElement("nav", { "aria-label": "Table of contents", role: "navigation" },
|
|
21853
21853
|
external_react_default().createElement("ul", { className: "toc-list" },
|
|
21854
21854
|
external_react_default().createElement("li", null,
|
|
21855
21855
|
external_react_default().createElement("a", { className: "tocHeader", href: "#" },
|
|
21856
21856
|
external_react_default().createElement("i", { className: "icon icon-text-align-left" }),
|
|
21857
|
-
|
|
21857
|
+
heading)),
|
|
21858
21858
|
external_react_default().createElement("li", { className: "toc-children" }, children))));
|
|
21859
21859
|
}
|
|
21860
21860
|
/* harmony default export */ const components_TableOfContents = (TableOfContents);
|
|
@@ -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(/ /g, ' ')
|
|
107962
107974
|
// @note: I'm not sure what's happening, but I think mdx is converting an
|
|
107963
107975
|
// 'a' to 'a' as a means of escaping it. I think this helps with
|
|
@@ -108131,8 +108143,8 @@ const run_run = (string, _opts = {}) => {
|
|
|
108131
108143
|
default: (props) => (external_react_default().createElement(contexts, { baseUrl: baseUrl, copyButtons: copyButtons, terms: terms, theme: theme, variables: variables },
|
|
108132
108144
|
external_react_default().createElement(Content, { ...props }))),
|
|
108133
108145
|
toc,
|
|
108134
|
-
Toc: props => Toc ? (external_react_default().createElement(components_TableOfContents,
|
|
108135
|
-
external_react_default().createElement(Toc,
|
|
108146
|
+
Toc: (props) => Toc ? (external_react_default().createElement(components_TableOfContents, { heading: props.heading },
|
|
108147
|
+
external_react_default().createElement(Toc, null))) : null,
|
|
108136
108148
|
stylesheet,
|
|
108137
108149
|
...exports,
|
|
108138
108150
|
};
|