@readme/markdown 6.75.0-beta.49 → 6.75.0-beta.50
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 +3 -3
- package/dist/main.node.js +3 -3
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -69219,7 +69219,7 @@ const rehypeToc = ({ components = {} }) => {
|
|
|
69219
69219
|
while (stack.length > depth) {
|
|
69220
69220
|
stack.pop();
|
|
69221
69221
|
}
|
|
69222
|
-
stack[stack.length - 1].children.push(h('li', null, h('
|
|
69222
|
+
stack[stack.length - 1].children.push(h('li', null, h('a', { href: `#${heading.properties.id}` }, heading.children)));
|
|
69223
69223
|
});
|
|
69224
69224
|
file.data.toc.ast = ast;
|
|
69225
69225
|
};
|
|
@@ -93638,10 +93638,10 @@ const run_run = async (stringOrFile, _opts = {}) => {
|
|
|
93638
93638
|
const { Fragment } = jsx_runtime_namespaceObject;
|
|
93639
93639
|
const { components, terms, variables, baseUrl } = _opts, opts = run_rest(_opts, ["components", "terms", "variables", "baseUrl"]);
|
|
93640
93640
|
const vfile = new VFile(stringOrFile);
|
|
93641
|
-
const exec = (file) => run(file, Object.assign(Object.assign(Object.assign({}, jsx_runtime_namespaceObject), { Fragment, baseUrl: "file:///home/runner/work/markdown/markdown/lib/run.tsx", imports: { React: (external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default()) }, useMDXComponents: makeUseMDXComponents(components) }), opts));
|
|
93641
|
+
const exec = (file, toc = false) => run(file, Object.assign(Object.assign(Object.assign({}, jsx_runtime_namespaceObject), { Fragment, baseUrl: "file:///home/runner/work/markdown/markdown/lib/run.tsx", imports: { React: (external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default()) }, useMDXComponents: makeUseMDXComponents(Object.assign(Object.assign({}, components), (toc && { p: Fragment }))) }), opts));
|
|
93642
93642
|
const file = await exec(vfile);
|
|
93643
93643
|
const Content = file.default;
|
|
93644
|
-
const { default: Toc } = 'toc' in vfile.data ? await exec(vfile.data.toc.vfile) : { default: null };
|
|
93644
|
+
const { default: Toc } = 'toc' in vfile.data ? await exec(vfile.data.toc.vfile, true) : { default: null };
|
|
93645
93645
|
return {
|
|
93646
93646
|
default: () => (external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement(contexts, { terms: terms, variables: variables, baseUrl: baseUrl },
|
|
93647
93647
|
external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement(Content, null))),
|
package/dist/main.node.js
CHANGED
|
@@ -70672,7 +70672,7 @@ const rehypeToc = ({ components = {} }) => {
|
|
|
70672
70672
|
while (stack.length > depth) {
|
|
70673
70673
|
stack.pop();
|
|
70674
70674
|
}
|
|
70675
|
-
stack[stack.length - 1].children.push(h('li', null, h('
|
|
70675
|
+
stack[stack.length - 1].children.push(h('li', null, h('a', { href: `#${heading.properties.id}` }, heading.children)));
|
|
70676
70676
|
});
|
|
70677
70677
|
file.data.toc.ast = ast;
|
|
70678
70678
|
};
|
|
@@ -95091,10 +95091,10 @@ const run_run = async (stringOrFile, _opts = {}) => {
|
|
|
95091
95091
|
const { Fragment } = jsx_runtime_namespaceObject;
|
|
95092
95092
|
const { components, terms, variables, baseUrl } = _opts, opts = run_rest(_opts, ["components", "terms", "variables", "baseUrl"]);
|
|
95093
95093
|
const vfile = new VFile(stringOrFile);
|
|
95094
|
-
const exec = (file) => run(file, Object.assign(Object.assign(Object.assign({}, jsx_runtime_namespaceObject), { Fragment, baseUrl: "file:///home/runner/work/markdown/markdown/lib/run.tsx", imports: { React: (external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default()) }, useMDXComponents: makeUseMDXComponents(components) }), opts));
|
|
95094
|
+
const exec = (file, toc = false) => run(file, Object.assign(Object.assign(Object.assign({}, jsx_runtime_namespaceObject), { Fragment, baseUrl: "file:///home/runner/work/markdown/markdown/lib/run.tsx", imports: { React: (external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default()) }, useMDXComponents: makeUseMDXComponents(Object.assign(Object.assign({}, components), (toc && { p: Fragment }))) }), opts));
|
|
95095
95095
|
const file = await exec(vfile);
|
|
95096
95096
|
const Content = file.default;
|
|
95097
|
-
const { default: Toc } = 'toc' in vfile.data ? await exec(vfile.data.toc.vfile) : { default: null };
|
|
95097
|
+
const { default: Toc } = 'toc' in vfile.data ? await exec(vfile.data.toc.vfile, true) : { default: null };
|
|
95098
95098
|
return {
|
|
95099
95099
|
default: () => (external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement(contexts, { terms: terms, variables: variables, baseUrl: baseUrl },
|
|
95100
95100
|
external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement(Content, null))),
|
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.
|
|
5
|
+
"version": "6.75.0-beta.50",
|
|
6
6
|
"main": "dist/main.node.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"browser": "dist/main.js",
|