@readme/markdown 9.7.0 → 9.9.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/10.node.js +2 -2
- package/dist/354.node.js +1 -1
- package/dist/enums.d.ts +1 -0
- package/dist/main.js +44 -2
- package/dist/main.node.js +44 -2
- package/dist/main.node.js.map +1 -1
- package/dist/processor/compile/plain.d.ts +3 -0
- package/package.json +1 -1
package/dist/10.node.js
CHANGED
|
@@ -918,7 +918,7 @@ class BaseRegExpVisitor {
|
|
|
918
918
|
|
|
919
919
|
/***/ }),
|
|
920
920
|
|
|
921
|
-
/***/
|
|
921
|
+
/***/ 4909:
|
|
922
922
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
923
923
|
|
|
924
924
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -1890,7 +1890,7 @@ function createPacketServices(context = langium__WEBPACK_IMPORTED_MODULE_1__/* .
|
|
|
1890
1890
|
/* harmony export */ qg: () => (/* binding */ parse)
|
|
1891
1891
|
/* harmony export */ });
|
|
1892
1892
|
/* unused harmony export MermaidParseError */
|
|
1893
|
-
/* harmony import */ var _chunks_mermaid_parser_core_chunk_2NYFTIL2_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
1893
|
+
/* harmony import */ var _chunks_mermaid_parser_core_chunk_2NYFTIL2_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4909);
|
|
1894
1894
|
/* harmony import */ var _chunks_mermaid_parser_core_chunk_EXZZNE6F_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5996);
|
|
1895
1895
|
/* harmony import */ var _chunks_mermaid_parser_core_chunk_V4Q32G6S_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9602);
|
|
1896
1896
|
/* harmony import */ var _chunks_mermaid_parser_core_chunk_ROXG7S4E_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2409);
|
package/dist/354.node.js
CHANGED
|
@@ -9,7 +9,7 @@ exports.modules = {
|
|
|
9
9
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10
10
|
/* harmony export */ createGitGraphServices: () => (/* reexport safe */ _chunk_2NYFTIL2_mjs__WEBPACK_IMPORTED_MODULE_0__.b)
|
|
11
11
|
/* harmony export */ });
|
|
12
|
-
/* harmony import */ var _chunk_2NYFTIL2_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
12
|
+
/* harmony import */ var _chunk_2NYFTIL2_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4909);
|
|
13
13
|
/* harmony import */ var _chunk_7PKI6E2E_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2156);
|
|
14
14
|
|
|
15
15
|
|
package/dist/enums.d.ts
CHANGED
package/dist/main.js
CHANGED
|
@@ -40912,6 +40912,7 @@ var NodeTypes;
|
|
|
40912
40912
|
NodeTypes["htmlBlock"] = "html-block";
|
|
40913
40913
|
NodeTypes["i"] = "i";
|
|
40914
40914
|
NodeTypes["imageBlock"] = "image-block";
|
|
40915
|
+
NodeTypes["plain"] = "plain";
|
|
40915
40916
|
NodeTypes["reusableContent"] = "reusable-content";
|
|
40916
40917
|
NodeTypes["tableau"] = "tableau";
|
|
40917
40918
|
NodeTypes["tutorialTile"] = "tutorial-tile";
|
|
@@ -58530,6 +58531,7 @@ const mermaidTransformer = () => (tree) => {
|
|
|
58530
58531
|
|
|
58531
58532
|
|
|
58532
58533
|
const types = {
|
|
58534
|
+
Anchor: 'link',
|
|
58533
58535
|
Callout: NodeTypes.callout,
|
|
58534
58536
|
Code: 'code',
|
|
58535
58537
|
CodeTabs: NodeTypes.codeTabs,
|
|
@@ -58672,6 +58674,21 @@ const coerceJsxToMd = ({ components = {}, html = false } = {}) => (node, index,
|
|
|
58672
58674
|
};
|
|
58673
58675
|
parent.children[index] = mdNode;
|
|
58674
58676
|
}
|
|
58677
|
+
else if (node.name === 'Anchor') {
|
|
58678
|
+
const hProperties = getAttrs(node);
|
|
58679
|
+
if (hProperties.href) {
|
|
58680
|
+
hProperties.url = hProperties.href;
|
|
58681
|
+
delete hProperties.href;
|
|
58682
|
+
}
|
|
58683
|
+
// @ts-expect-error we don't have a mechanism to enforce the URL attribute type right now
|
|
58684
|
+
const mdNode = {
|
|
58685
|
+
...hProperties,
|
|
58686
|
+
children: node.children,
|
|
58687
|
+
type: types[node.name],
|
|
58688
|
+
position: node.position,
|
|
58689
|
+
};
|
|
58690
|
+
parent.children[index] = mdNode;
|
|
58691
|
+
}
|
|
58675
58692
|
else if (node.name in types) {
|
|
58676
58693
|
const hProperties = getAttrs(node);
|
|
58677
58694
|
const mdNode = {
|
|
@@ -58773,6 +58790,25 @@ const readmeToMdx = () => tree => {
|
|
|
58773
58790
|
});
|
|
58774
58791
|
}
|
|
58775
58792
|
});
|
|
58793
|
+
const hasExtraLinkAttrs = (attributes) => !!attributes.find(attr => !['href', 'label'].includes(attr.name));
|
|
58794
|
+
// converts links with extra attributes to Anchor elements
|
|
58795
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
58796
|
+
visit(tree, 'link', ({ type, children, position, ...attrs }, index, parent) => {
|
|
58797
|
+
if ('url' in attrs) {
|
|
58798
|
+
attrs.href = attrs.url;
|
|
58799
|
+
delete attrs.url;
|
|
58800
|
+
}
|
|
58801
|
+
const attributes = toAttributes(attrs);
|
|
58802
|
+
if (hasExtraLinkAttrs(attributes)) {
|
|
58803
|
+
parent.children.splice(index, 1, {
|
|
58804
|
+
type: 'mdxJsxTextElement',
|
|
58805
|
+
name: 'Anchor',
|
|
58806
|
+
attributes,
|
|
58807
|
+
children,
|
|
58808
|
+
position,
|
|
58809
|
+
});
|
|
58810
|
+
}
|
|
58811
|
+
});
|
|
58776
58812
|
visit(tree, 'html', (node, index, parent) => {
|
|
58777
58813
|
const html = node.value;
|
|
58778
58814
|
const isScriptOrStyleTag = [!!html.match(/^<(?:style|script)/i), !!html.match(/<\/(?:style|script)>$/i)];
|
|
@@ -89938,6 +89974,10 @@ ${reformatHTML(html)}
|
|
|
89938
89974
|
};
|
|
89939
89975
|
/* harmony default export */ const html_block = (htmlBlock);
|
|
89940
89976
|
|
|
89977
|
+
;// ./processor/compile/plain.ts
|
|
89978
|
+
const plain = (node) => node.value;
|
|
89979
|
+
/* harmony default export */ const compile_plain = (plain);
|
|
89980
|
+
|
|
89941
89981
|
;// ./processor/compile/index.ts
|
|
89942
89982
|
|
|
89943
89983
|
|
|
@@ -89946,6 +89986,7 @@ ${reformatHTML(html)}
|
|
|
89946
89986
|
|
|
89947
89987
|
|
|
89948
89988
|
|
|
89989
|
+
|
|
89949
89990
|
function compilers() {
|
|
89950
89991
|
const data = this.data();
|
|
89951
89992
|
const toMarkdownExtensions = data.toMarkdownExtensions || (data.toMarkdownExtensions = []);
|
|
@@ -89962,6 +90003,7 @@ function compilers() {
|
|
|
89962
90003
|
figure: compile_compatibility,
|
|
89963
90004
|
html: compile_compatibility,
|
|
89964
90005
|
i: compile_compatibility,
|
|
90006
|
+
plain: compile_plain,
|
|
89965
90007
|
yaml: compile_compatibility,
|
|
89966
90008
|
};
|
|
89967
90009
|
toMarkdownExtensions.push({ extensions: [{ handlers }] });
|
|
@@ -90607,10 +90649,10 @@ function plain_all(node, opts) {
|
|
|
90607
90649
|
}
|
|
90608
90650
|
return result.join(' ').replaceAll(/\s+/g, ' ').trim();
|
|
90609
90651
|
}
|
|
90610
|
-
const
|
|
90652
|
+
const plain_plain = (node, opts = {}) => {
|
|
90611
90653
|
return 'children' in node ? plain_all(node, opts) || plain_one(node, opts) : plain_one(node, opts);
|
|
90612
90654
|
};
|
|
90613
|
-
/* harmony default export */ const lib_plain = (
|
|
90655
|
+
/* harmony default export */ const lib_plain = (plain_plain);
|
|
90614
90656
|
|
|
90615
90657
|
;// ./node_modules/@mdx-js/mdx/lib/run.js
|
|
90616
90658
|
/**
|
package/dist/main.node.js
CHANGED
|
@@ -57822,6 +57822,7 @@ var NodeTypes;
|
|
|
57822
57822
|
NodeTypes["htmlBlock"] = "html-block";
|
|
57823
57823
|
NodeTypes["i"] = "i";
|
|
57824
57824
|
NodeTypes["imageBlock"] = "image-block";
|
|
57825
|
+
NodeTypes["plain"] = "plain";
|
|
57825
57826
|
NodeTypes["reusableContent"] = "reusable-content";
|
|
57826
57827
|
NodeTypes["tableau"] = "tableau";
|
|
57827
57828
|
NodeTypes["tutorialTile"] = "tutorial-tile";
|
|
@@ -75440,6 +75441,7 @@ const mermaidTransformer = () => (tree) => {
|
|
|
75440
75441
|
|
|
75441
75442
|
|
|
75442
75443
|
const readme_components_types = {
|
|
75444
|
+
Anchor: 'link',
|
|
75443
75445
|
Callout: NodeTypes.callout,
|
|
75444
75446
|
Code: 'code',
|
|
75445
75447
|
CodeTabs: NodeTypes.codeTabs,
|
|
@@ -75582,6 +75584,21 @@ const coerceJsxToMd = ({ components = {}, html = false } = {}) => (node, index,
|
|
|
75582
75584
|
};
|
|
75583
75585
|
parent.children[index] = mdNode;
|
|
75584
75586
|
}
|
|
75587
|
+
else if (node.name === 'Anchor') {
|
|
75588
|
+
const hProperties = getAttrs(node);
|
|
75589
|
+
if (hProperties.href) {
|
|
75590
|
+
hProperties.url = hProperties.href;
|
|
75591
|
+
delete hProperties.href;
|
|
75592
|
+
}
|
|
75593
|
+
// @ts-expect-error we don't have a mechanism to enforce the URL attribute type right now
|
|
75594
|
+
const mdNode = {
|
|
75595
|
+
...hProperties,
|
|
75596
|
+
children: node.children,
|
|
75597
|
+
type: readme_components_types[node.name],
|
|
75598
|
+
position: node.position,
|
|
75599
|
+
};
|
|
75600
|
+
parent.children[index] = mdNode;
|
|
75601
|
+
}
|
|
75585
75602
|
else if (node.name in readme_components_types) {
|
|
75586
75603
|
const hProperties = getAttrs(node);
|
|
75587
75604
|
const mdNode = {
|
|
@@ -75683,6 +75700,25 @@ const readmeToMdx = () => tree => {
|
|
|
75683
75700
|
});
|
|
75684
75701
|
}
|
|
75685
75702
|
});
|
|
75703
|
+
const hasExtraLinkAttrs = (attributes) => !!attributes.find(attr => !['href', 'label'].includes(attr.name));
|
|
75704
|
+
// converts links with extra attributes to Anchor elements
|
|
75705
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
75706
|
+
visit(tree, 'link', ({ type, children, position, ...attrs }, index, parent) => {
|
|
75707
|
+
if ('url' in attrs) {
|
|
75708
|
+
attrs.href = attrs.url;
|
|
75709
|
+
delete attrs.url;
|
|
75710
|
+
}
|
|
75711
|
+
const attributes = toAttributes(attrs);
|
|
75712
|
+
if (hasExtraLinkAttrs(attributes)) {
|
|
75713
|
+
parent.children.splice(index, 1, {
|
|
75714
|
+
type: 'mdxJsxTextElement',
|
|
75715
|
+
name: 'Anchor',
|
|
75716
|
+
attributes,
|
|
75717
|
+
children,
|
|
75718
|
+
position,
|
|
75719
|
+
});
|
|
75720
|
+
}
|
|
75721
|
+
});
|
|
75686
75722
|
visit(tree, 'html', (node, index, parent) => {
|
|
75687
75723
|
const html = node.value;
|
|
75688
75724
|
const isScriptOrStyleTag = [!!html.match(/^<(?:style|script)/i), !!html.match(/<\/(?:style|script)>$/i)];
|
|
@@ -106848,6 +106884,10 @@ ${reformatHTML(html)}
|
|
|
106848
106884
|
};
|
|
106849
106885
|
/* harmony default export */ const html_block = (htmlBlock);
|
|
106850
106886
|
|
|
106887
|
+
;// ./processor/compile/plain.ts
|
|
106888
|
+
const plain = (node) => node.value;
|
|
106889
|
+
/* harmony default export */ const compile_plain = (plain);
|
|
106890
|
+
|
|
106851
106891
|
;// ./processor/compile/index.ts
|
|
106852
106892
|
|
|
106853
106893
|
|
|
@@ -106856,6 +106896,7 @@ ${reformatHTML(html)}
|
|
|
106856
106896
|
|
|
106857
106897
|
|
|
106858
106898
|
|
|
106899
|
+
|
|
106859
106900
|
function compilers() {
|
|
106860
106901
|
const data = this.data();
|
|
106861
106902
|
const toMarkdownExtensions = data.toMarkdownExtensions || (data.toMarkdownExtensions = []);
|
|
@@ -106872,6 +106913,7 @@ function compilers() {
|
|
|
106872
106913
|
figure: compile_compatibility,
|
|
106873
106914
|
html: compile_compatibility,
|
|
106874
106915
|
i: compile_compatibility,
|
|
106916
|
+
plain: compile_plain,
|
|
106875
106917
|
yaml: compile_compatibility,
|
|
106876
106918
|
};
|
|
106877
106919
|
toMarkdownExtensions.push({ extensions: [{ handlers }] });
|
|
@@ -107517,10 +107559,10 @@ function plain_all(node, opts) {
|
|
|
107517
107559
|
}
|
|
107518
107560
|
return result.join(' ').replaceAll(/\s+/g, ' ').trim();
|
|
107519
107561
|
}
|
|
107520
|
-
const
|
|
107562
|
+
const plain_plain = (node, opts = {}) => {
|
|
107521
107563
|
return 'children' in node ? plain_all(node, opts) || plain_one(node, opts) : plain_one(node, opts);
|
|
107522
107564
|
};
|
|
107523
|
-
/* harmony default export */ const lib_plain = (
|
|
107565
|
+
/* harmony default export */ const lib_plain = (plain_plain);
|
|
107524
107566
|
|
|
107525
107567
|
;// ./node_modules/@mdx-js/mdx/lib/run.js
|
|
107526
107568
|
/**
|