@readme/markdown 7.10.2 → 7.10.4
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/10.node.js +22721 -0
- package/dist/11.node.js +1443 -0
- package/dist/120.node.js +22 -0
- package/dist/134.node.js +22 -0
- package/dist/150.node.js +1891 -0
- package/dist/17.node.js +1376 -0
- package/dist/246.node.js +1932 -0
- package/dist/351.node.js +2403 -0
- package/dist/366.node.js +1184 -0
- package/dist/403.node.js +2195 -0
- package/dist/429.node.js +11133 -0
- package/dist/485.node.js +517 -0
- package/dist/486.node.js +31818 -0
- package/dist/488.node.js +58 -0
- package/dist/489.node.js +18475 -0
- package/dist/510.node.js +249 -0
- package/dist/52.node.js +811 -0
- package/dist/550.node.js +1456 -0
- package/dist/551.node.js +2725 -0
- package/dist/617.node.js +22 -0
- package/dist/687.node.js +3674 -0
- package/dist/745.node.js +7507 -0
- package/dist/775.node.js +1903 -0
- package/dist/786.node.js +31381 -0
- package/dist/788.node.js +1024 -0
- package/dist/81.node.js +385 -0
- package/dist/849.node.js +2589 -0
- package/dist/863.node.js +22 -0
- package/dist/867.node.js +1417 -0
- package/dist/881.node.js +1279 -0
- package/dist/885.node.js +51 -0
- package/dist/896.node.js +1616 -0
- package/dist/906.node.js +1818 -0
- package/dist/91.node.js +22 -0
- package/dist/940.node.js +3362 -0
- package/dist/952.node.js +246 -0
- package/dist/995.node.js +5737 -0
- package/dist/main.js +16 -5
- package/dist/main.node.js +5460 -398
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -65544,11 +65544,22 @@ const readmeToMdx = () => tree => {
|
|
|
65544
65544
|
|
|
65545
65545
|
const variables = ({ asMdx } = { asMdx: true }) => tree => {
|
|
65546
65546
|
visit(tree, (node, index, parent) => {
|
|
65547
|
+
var _a, _b;
|
|
65547
65548
|
if (!['mdxFlowExpression', 'mdxTextExpression'].includes(node.type) || !('value' in node))
|
|
65548
65549
|
return;
|
|
65549
|
-
|
|
65550
|
-
if (
|
|
65550
|
+
// @ts-expect-error - estree is not defined on our mdx types?!
|
|
65551
|
+
if (node.data.estree.type !== 'Program')
|
|
65552
|
+
return;
|
|
65553
|
+
// @ts-expect-error - estree is not defined on our mdx types?!
|
|
65554
|
+
const [expression] = node.data.estree.body;
|
|
65555
|
+
if (!expression ||
|
|
65556
|
+
expression.type !== 'ExpressionStatement' ||
|
|
65557
|
+
((_a = expression.expression.object) === null || _a === void 0 ? void 0 : _a.name) !== 'user' ||
|
|
65558
|
+
!['Literal', 'Identifier'].includes((_b = expression.expression.property) === null || _b === void 0 ? void 0 : _b.type))
|
|
65551
65559
|
return;
|
|
65560
|
+
const name = expression.expression.property.type === 'Identifier'
|
|
65561
|
+
? expression.expression.property.name
|
|
65562
|
+
: expression.expression.property.value;
|
|
65552
65563
|
let variable = asMdx
|
|
65553
65564
|
? {
|
|
65554
65565
|
type: 'mdxJsxTextElement',
|
|
@@ -65557,7 +65568,7 @@ const variables = ({ asMdx } = { asMdx: true }) => tree => {
|
|
|
65557
65568
|
{
|
|
65558
65569
|
type: 'mdxJsxAttribute',
|
|
65559
65570
|
name: 'name',
|
|
65560
|
-
value:
|
|
65571
|
+
value: name,
|
|
65561
65572
|
},
|
|
65562
65573
|
],
|
|
65563
65574
|
children: [],
|
|
@@ -65568,7 +65579,7 @@ const variables = ({ asMdx } = { asMdx: true }) => tree => {
|
|
|
65568
65579
|
data: {
|
|
65569
65580
|
hName: 'Variable',
|
|
65570
65581
|
hProperties: {
|
|
65571
|
-
name
|
|
65582
|
+
name,
|
|
65572
65583
|
},
|
|
65573
65584
|
},
|
|
65574
65585
|
value: `{${node.value}}`,
|
|
@@ -83395,7 +83406,7 @@ const variable = (node) => {
|
|
|
83395
83406
|
// @note: coming from RDMD, it's set as `variable`. But when mdx is parsed,
|
|
83396
83407
|
// it's set as `name`
|
|
83397
83408
|
const name = node.data.hProperties.variable || node.data.hProperties.name;
|
|
83398
|
-
return `{user.${name}}`;
|
|
83409
|
+
return name.toString().match(/ /) ? `{user[${JSON.stringify(name)}]}` : `{user.${name}}`;
|
|
83399
83410
|
};
|
|
83400
83411
|
/* harmony default export */ const compile_variable = (variable);
|
|
83401
83412
|
|