@readme/markdown 13.1.4 → 13.3.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/lib/mdast-util/legacy-variable/index.d.ts +2 -0
- package/dist/lib/mdxish.d.ts +2 -1
- package/dist/lib/micromark/legacy-variable/index.d.ts +4 -0
- package/dist/lib/micromark/legacy-variable/syntax.d.ts +10 -0
- package/dist/lib/plain.d.ts +6 -0
- package/dist/main.js +491 -200
- package/dist/main.node.js +491 -200
- package/dist/main.node.js.map +1 -1
- package/dist/processor/transform/mdxish/heading-slugs.d.ts +8 -0
- package/dist/processor/transform/mdxish/terminate-html-flow-blocks.d.ts +5 -5
- package/dist/processor/transform/mdxish/variables-code.d.ts +14 -0
- package/package.json +3 -2
package/dist/main.js
CHANGED
|
@@ -12538,12 +12538,12 @@ var parseOptions = function parseOptions() {
|
|
|
12538
12538
|
return opts;
|
|
12539
12539
|
};
|
|
12540
12540
|
|
|
12541
|
-
;// ./node_modules/
|
|
12541
|
+
;// ./node_modules/github-slugger/regex.js
|
|
12542
12542
|
// This module is generated by `script/`.
|
|
12543
12543
|
/* eslint-disable no-control-regex, no-misleading-character-class, no-useless-escape */
|
|
12544
12544
|
const regex = /[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g
|
|
12545
12545
|
|
|
12546
|
-
;// ./node_modules/
|
|
12546
|
+
;// ./node_modules/github-slugger/index.js
|
|
12547
12547
|
|
|
12548
12548
|
|
|
12549
12549
|
const own = Object.hasOwnProperty
|
|
@@ -52986,6 +52986,8 @@ function plain_one(node, opts) {
|
|
|
52986
52986
|
case 'variable':
|
|
52987
52987
|
case 'Variable': {
|
|
52988
52988
|
const key = node.properties.name.toString();
|
|
52989
|
+
if (opts.preserveVariableSyntax)
|
|
52990
|
+
return `{user.${key}}`;
|
|
52989
52991
|
const val = 'variables' in opts && opts.variables[key];
|
|
52990
52992
|
return val || key;
|
|
52991
52993
|
}
|
|
@@ -53009,6 +53011,8 @@ function plain_one(node, opts) {
|
|
|
53009
53011
|
if (node.type === 'mdxTextExpression') {
|
|
53010
53012
|
const key = extractMdxVariableKey(node);
|
|
53011
53013
|
if (key) {
|
|
53014
|
+
if (opts.preserveVariableSyntax)
|
|
53015
|
+
return `{user.${key}}`;
|
|
53012
53016
|
return ('variables' in opts && opts.variables[key]) || key;
|
|
53013
53017
|
}
|
|
53014
53018
|
}
|
|
@@ -70833,9 +70837,320 @@ const mdxToHast = () => tree => {
|
|
|
70833
70837
|
};
|
|
70834
70838
|
/* harmony default export */ const mdx_to_hast = (mdxToHast);
|
|
70835
70839
|
|
|
70840
|
+
;// ./lib/mdast-util/legacy-variable/index.ts
|
|
70841
|
+
|
|
70842
|
+
const contextMap = new WeakMap();
|
|
70843
|
+
function findlegacyVariableToken() {
|
|
70844
|
+
// tokenStack is micromark's current open token ancestry; find the nearest legacyVariable token.
|
|
70845
|
+
const events = this.tokenStack;
|
|
70846
|
+
for (let i = events.length - 1; i >= 0; i -= 1) {
|
|
70847
|
+
const token = events[i][0];
|
|
70848
|
+
if (token.type === 'legacyVariable')
|
|
70849
|
+
return token;
|
|
70850
|
+
}
|
|
70851
|
+
return undefined;
|
|
70852
|
+
}
|
|
70853
|
+
function enterlegacyVariable(token) {
|
|
70854
|
+
contextMap.set(token, { value: '' });
|
|
70855
|
+
}
|
|
70856
|
+
function exitlegacyVariableValue(token) {
|
|
70857
|
+
const variableToken = findlegacyVariableToken.call(this);
|
|
70858
|
+
if (!variableToken)
|
|
70859
|
+
return;
|
|
70860
|
+
const ctx = contextMap.get(variableToken);
|
|
70861
|
+
// Build up the variable characters
|
|
70862
|
+
if (ctx)
|
|
70863
|
+
ctx.value += this.sliceSerialize(token);
|
|
70864
|
+
}
|
|
70865
|
+
function exitlegacyVariable(token) {
|
|
70866
|
+
const ctx = contextMap.get(token);
|
|
70867
|
+
const serialized = this.sliceSerialize(token);
|
|
70868
|
+
const variableName = serialized.startsWith('<<') && serialized.endsWith('>>')
|
|
70869
|
+
? serialized.slice(2, -2)
|
|
70870
|
+
: ctx?.value ?? '';
|
|
70871
|
+
const nodePosition = {
|
|
70872
|
+
start: {
|
|
70873
|
+
offset: token.start.offset,
|
|
70874
|
+
line: token.start.line,
|
|
70875
|
+
column: token.start.column,
|
|
70876
|
+
},
|
|
70877
|
+
end: {
|
|
70878
|
+
offset: token.end.offset,
|
|
70879
|
+
line: token.end.line,
|
|
70880
|
+
column: token.end.column,
|
|
70881
|
+
},
|
|
70882
|
+
};
|
|
70883
|
+
if (variableName.startsWith('glossary:')) {
|
|
70884
|
+
const term = variableName.slice('glossary:'.length).trim();
|
|
70885
|
+
this.enter({
|
|
70886
|
+
type: NodeTypes.glossary,
|
|
70887
|
+
data: {
|
|
70888
|
+
hName: 'Glossary',
|
|
70889
|
+
hProperties: { term },
|
|
70890
|
+
},
|
|
70891
|
+
children: [{ type: 'text', value: term }],
|
|
70892
|
+
position: nodePosition,
|
|
70893
|
+
}, token);
|
|
70894
|
+
this.exit(token);
|
|
70895
|
+
contextMap.delete(token);
|
|
70896
|
+
return;
|
|
70897
|
+
}
|
|
70898
|
+
this.enter({
|
|
70899
|
+
type: NodeTypes.variable,
|
|
70900
|
+
data: {
|
|
70901
|
+
hName: 'Variable',
|
|
70902
|
+
hProperties: { name: variableName.trim(), isLegacy: true },
|
|
70903
|
+
},
|
|
70904
|
+
value: `<<${variableName}>>`,
|
|
70905
|
+
}, token);
|
|
70906
|
+
this.exit(token);
|
|
70907
|
+
contextMap.delete(token);
|
|
70908
|
+
}
|
|
70909
|
+
function legacyVariableFromMarkdown() {
|
|
70910
|
+
return {
|
|
70911
|
+
enter: {
|
|
70912
|
+
legacyVariable: enterlegacyVariable,
|
|
70913
|
+
},
|
|
70914
|
+
exit: {
|
|
70915
|
+
legacyVariableValue: exitlegacyVariableValue,
|
|
70916
|
+
legacyVariable: exitlegacyVariable,
|
|
70917
|
+
},
|
|
70918
|
+
};
|
|
70919
|
+
}
|
|
70920
|
+
|
|
70921
|
+
;// ./node_modules/micromark-util-symbol/lib/codes.js
|
|
70922
|
+
/**
|
|
70923
|
+
* Character codes.
|
|
70924
|
+
*
|
|
70925
|
+
* This module is compiled away!
|
|
70926
|
+
*
|
|
70927
|
+
* micromark works based on character codes.
|
|
70928
|
+
* This module contains constants for the ASCII block and the replacement
|
|
70929
|
+
* character.
|
|
70930
|
+
* A couple of them are handled in a special way, such as the line endings
|
|
70931
|
+
* (CR, LF, and CR+LF, commonly known as end-of-line: EOLs), the tab (horizontal
|
|
70932
|
+
* tab) and its expansion based on what column it’s at (virtual space),
|
|
70933
|
+
* and the end-of-file (eof) character.
|
|
70934
|
+
* As values are preprocessed before handling them, the actual characters LF,
|
|
70935
|
+
* CR, HT, and NUL (which is present as the replacement character), are
|
|
70936
|
+
* guaranteed to not exist.
|
|
70937
|
+
*
|
|
70938
|
+
* Unicode basic latin block.
|
|
70939
|
+
*/
|
|
70940
|
+
const codes = /** @type {const} */ ({
|
|
70941
|
+
carriageReturn: -5,
|
|
70942
|
+
lineFeed: -4,
|
|
70943
|
+
carriageReturnLineFeed: -3,
|
|
70944
|
+
horizontalTab: -2,
|
|
70945
|
+
virtualSpace: -1,
|
|
70946
|
+
eof: null,
|
|
70947
|
+
nul: 0,
|
|
70948
|
+
soh: 1,
|
|
70949
|
+
stx: 2,
|
|
70950
|
+
etx: 3,
|
|
70951
|
+
eot: 4,
|
|
70952
|
+
enq: 5,
|
|
70953
|
+
ack: 6,
|
|
70954
|
+
bel: 7,
|
|
70955
|
+
bs: 8,
|
|
70956
|
+
ht: 9, // `\t`
|
|
70957
|
+
lf: 10, // `\n`
|
|
70958
|
+
vt: 11, // `\v`
|
|
70959
|
+
ff: 12, // `\f`
|
|
70960
|
+
cr: 13, // `\r`
|
|
70961
|
+
so: 14,
|
|
70962
|
+
si: 15,
|
|
70963
|
+
dle: 16,
|
|
70964
|
+
dc1: 17,
|
|
70965
|
+
dc2: 18,
|
|
70966
|
+
dc3: 19,
|
|
70967
|
+
dc4: 20,
|
|
70968
|
+
nak: 21,
|
|
70969
|
+
syn: 22,
|
|
70970
|
+
etb: 23,
|
|
70971
|
+
can: 24,
|
|
70972
|
+
em: 25,
|
|
70973
|
+
sub: 26,
|
|
70974
|
+
esc: 27,
|
|
70975
|
+
fs: 28,
|
|
70976
|
+
gs: 29,
|
|
70977
|
+
rs: 30,
|
|
70978
|
+
us: 31,
|
|
70979
|
+
space: 32,
|
|
70980
|
+
exclamationMark: 33, // `!`
|
|
70981
|
+
quotationMark: 34, // `"`
|
|
70982
|
+
numberSign: 35, // `#`
|
|
70983
|
+
dollarSign: 36, // `$`
|
|
70984
|
+
percentSign: 37, // `%`
|
|
70985
|
+
ampersand: 38, // `&`
|
|
70986
|
+
apostrophe: 39, // `'`
|
|
70987
|
+
leftParenthesis: 40, // `(`
|
|
70988
|
+
rightParenthesis: 41, // `)`
|
|
70989
|
+
asterisk: 42, // `*`
|
|
70990
|
+
plusSign: 43, // `+`
|
|
70991
|
+
comma: 44, // `,`
|
|
70992
|
+
dash: 45, // `-`
|
|
70993
|
+
dot: 46, // `.`
|
|
70994
|
+
slash: 47, // `/`
|
|
70995
|
+
digit0: 48, // `0`
|
|
70996
|
+
digit1: 49, // `1`
|
|
70997
|
+
digit2: 50, // `2`
|
|
70998
|
+
digit3: 51, // `3`
|
|
70999
|
+
digit4: 52, // `4`
|
|
71000
|
+
digit5: 53, // `5`
|
|
71001
|
+
digit6: 54, // `6`
|
|
71002
|
+
digit7: 55, // `7`
|
|
71003
|
+
digit8: 56, // `8`
|
|
71004
|
+
digit9: 57, // `9`
|
|
71005
|
+
colon: 58, // `:`
|
|
71006
|
+
semicolon: 59, // `;`
|
|
71007
|
+
lessThan: 60, // `<`
|
|
71008
|
+
equalsTo: 61, // `=`
|
|
71009
|
+
greaterThan: 62, // `>`
|
|
71010
|
+
questionMark: 63, // `?`
|
|
71011
|
+
atSign: 64, // `@`
|
|
71012
|
+
uppercaseA: 65, // `A`
|
|
71013
|
+
uppercaseB: 66, // `B`
|
|
71014
|
+
uppercaseC: 67, // `C`
|
|
71015
|
+
uppercaseD: 68, // `D`
|
|
71016
|
+
uppercaseE: 69, // `E`
|
|
71017
|
+
uppercaseF: 70, // `F`
|
|
71018
|
+
uppercaseG: 71, // `G`
|
|
71019
|
+
uppercaseH: 72, // `H`
|
|
71020
|
+
uppercaseI: 73, // `I`
|
|
71021
|
+
uppercaseJ: 74, // `J`
|
|
71022
|
+
uppercaseK: 75, // `K`
|
|
71023
|
+
uppercaseL: 76, // `L`
|
|
71024
|
+
uppercaseM: 77, // `M`
|
|
71025
|
+
uppercaseN: 78, // `N`
|
|
71026
|
+
uppercaseO: 79, // `O`
|
|
71027
|
+
uppercaseP: 80, // `P`
|
|
71028
|
+
uppercaseQ: 81, // `Q`
|
|
71029
|
+
uppercaseR: 82, // `R`
|
|
71030
|
+
uppercaseS: 83, // `S`
|
|
71031
|
+
uppercaseT: 84, // `T`
|
|
71032
|
+
uppercaseU: 85, // `U`
|
|
71033
|
+
uppercaseV: 86, // `V`
|
|
71034
|
+
uppercaseW: 87, // `W`
|
|
71035
|
+
uppercaseX: 88, // `X`
|
|
71036
|
+
uppercaseY: 89, // `Y`
|
|
71037
|
+
uppercaseZ: 90, // `Z`
|
|
71038
|
+
leftSquareBracket: 91, // `[`
|
|
71039
|
+
backslash: 92, // `\`
|
|
71040
|
+
rightSquareBracket: 93, // `]`
|
|
71041
|
+
caret: 94, // `^`
|
|
71042
|
+
underscore: 95, // `_`
|
|
71043
|
+
graveAccent: 96, // `` ` ``
|
|
71044
|
+
lowercaseA: 97, // `a`
|
|
71045
|
+
lowercaseB: 98, // `b`
|
|
71046
|
+
lowercaseC: 99, // `c`
|
|
71047
|
+
lowercaseD: 100, // `d`
|
|
71048
|
+
lowercaseE: 101, // `e`
|
|
71049
|
+
lowercaseF: 102, // `f`
|
|
71050
|
+
lowercaseG: 103, // `g`
|
|
71051
|
+
lowercaseH: 104, // `h`
|
|
71052
|
+
lowercaseI: 105, // `i`
|
|
71053
|
+
lowercaseJ: 106, // `j`
|
|
71054
|
+
lowercaseK: 107, // `k`
|
|
71055
|
+
lowercaseL: 108, // `l`
|
|
71056
|
+
lowercaseM: 109, // `m`
|
|
71057
|
+
lowercaseN: 110, // `n`
|
|
71058
|
+
lowercaseO: 111, // `o`
|
|
71059
|
+
lowercaseP: 112, // `p`
|
|
71060
|
+
lowercaseQ: 113, // `q`
|
|
71061
|
+
lowercaseR: 114, // `r`
|
|
71062
|
+
lowercaseS: 115, // `s`
|
|
71063
|
+
lowercaseT: 116, // `t`
|
|
71064
|
+
lowercaseU: 117, // `u`
|
|
71065
|
+
lowercaseV: 118, // `v`
|
|
71066
|
+
lowercaseW: 119, // `w`
|
|
71067
|
+
lowercaseX: 120, // `x`
|
|
71068
|
+
lowercaseY: 121, // `y`
|
|
71069
|
+
lowercaseZ: 122, // `z`
|
|
71070
|
+
leftCurlyBrace: 123, // `{`
|
|
71071
|
+
verticalBar: 124, // `|`
|
|
71072
|
+
rightCurlyBrace: 125, // `}`
|
|
71073
|
+
tilde: 126, // `~`
|
|
71074
|
+
del: 127,
|
|
71075
|
+
// Unicode Specials block.
|
|
71076
|
+
byteOrderMarker: 65_279,
|
|
71077
|
+
// Unicode Specials block.
|
|
71078
|
+
replacementCharacter: 65_533 // `�`
|
|
71079
|
+
})
|
|
71080
|
+
|
|
71081
|
+
;// ./lib/micromark/legacy-variable/syntax.ts
|
|
71082
|
+
|
|
71083
|
+
|
|
71084
|
+
function isAllowedValueChar(code) {
|
|
71085
|
+
return (code !== null &&
|
|
71086
|
+
code !== codes.lessThan &&
|
|
71087
|
+
code !== codes.greaterThan &&
|
|
71088
|
+
!markdownLineEnding(code));
|
|
71089
|
+
}
|
|
71090
|
+
const legacyVariableConstruct = {
|
|
71091
|
+
name: 'legacyVariable',
|
|
71092
|
+
tokenize,
|
|
71093
|
+
};
|
|
71094
|
+
function tokenize(effects, ok, nok) {
|
|
71095
|
+
let hasValue = false;
|
|
71096
|
+
const start = (code) => {
|
|
71097
|
+
if (code !== codes.lessThan)
|
|
71098
|
+
return nok(code);
|
|
71099
|
+
effects.enter('legacyVariable');
|
|
71100
|
+
effects.enter('legacyVariableMarkerStart');
|
|
71101
|
+
effects.consume(code); // <
|
|
71102
|
+
return open2;
|
|
71103
|
+
};
|
|
71104
|
+
const open2 = (code) => {
|
|
71105
|
+
if (code !== codes.lessThan)
|
|
71106
|
+
return nok(code);
|
|
71107
|
+
effects.consume(code); // <<
|
|
71108
|
+
effects.exit('legacyVariableMarkerStart');
|
|
71109
|
+
effects.enter('legacyVariableValue');
|
|
71110
|
+
return value;
|
|
71111
|
+
};
|
|
71112
|
+
const value = (code) => {
|
|
71113
|
+
if (code === codes.greaterThan) {
|
|
71114
|
+
if (!hasValue)
|
|
71115
|
+
return nok(code);
|
|
71116
|
+
effects.exit('legacyVariableValue');
|
|
71117
|
+
effects.enter('legacyVariableMarkerEnd');
|
|
71118
|
+
effects.consume(code); // >
|
|
71119
|
+
return close2;
|
|
71120
|
+
}
|
|
71121
|
+
if (!isAllowedValueChar(code))
|
|
71122
|
+
return nok(code);
|
|
71123
|
+
hasValue = true;
|
|
71124
|
+
effects.consume(code);
|
|
71125
|
+
return value;
|
|
71126
|
+
};
|
|
71127
|
+
const close2 = (code) => {
|
|
71128
|
+
if (code !== codes.greaterThan)
|
|
71129
|
+
return nok(code);
|
|
71130
|
+
effects.consume(code); // >>
|
|
71131
|
+
effects.exit('legacyVariableMarkerEnd');
|
|
71132
|
+
effects.exit('legacyVariable');
|
|
71133
|
+
return ok;
|
|
71134
|
+
};
|
|
71135
|
+
return start;
|
|
71136
|
+
}
|
|
71137
|
+
function legacyVariable() {
|
|
71138
|
+
return {
|
|
71139
|
+
text: { [codes.lessThan]: legacyVariableConstruct },
|
|
71140
|
+
};
|
|
71141
|
+
}
|
|
71142
|
+
|
|
71143
|
+
;// ./lib/micromark/legacy-variable/index.ts
|
|
71144
|
+
/**
|
|
71145
|
+
* Micromark extension for <<variable>> / <<glossary:term>> inline syntax.
|
|
71146
|
+
*/
|
|
71147
|
+
|
|
71148
|
+
|
|
70836
71149
|
;// ./processor/transform/mdxish/mdxish-component-blocks.ts
|
|
70837
71150
|
|
|
70838
71151
|
|
|
71152
|
+
|
|
71153
|
+
|
|
70839
71154
|
const pascalCaseTagPattern = /^<([A-Z][A-Za-z0-9_]*)([^>]*?)(\/?)>([\s\S]*)?$/;
|
|
70840
71155
|
const tagAttributePattern = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*("[^"]*"|'[^']*'|[^\s"'>]+))?/g;
|
|
70841
71156
|
/**
|
|
@@ -70852,7 +71167,10 @@ const MAX_LOOKAHEAD = 30;
|
|
|
70852
71167
|
* Glossary and Anchor are inline components.
|
|
70853
71168
|
*/
|
|
70854
71169
|
const EXCLUDED_TAGS = new Set(['HTMLBlock', 'Table', 'Glossary', 'Anchor']);
|
|
70855
|
-
const inlineMdProcessor = unified()
|
|
71170
|
+
const inlineMdProcessor = unified()
|
|
71171
|
+
.data('micromarkExtensions', [legacyVariable()])
|
|
71172
|
+
.data('fromMarkdownExtensions', [legacyVariableFromMarkdown()])
|
|
71173
|
+
.use(remarkParse);
|
|
70856
71174
|
const isClosingTag = (value, tag) => value.trim() === `</${tag}>`;
|
|
70857
71175
|
/**
|
|
70858
71176
|
* Parse markdown content into mdast children nodes.
|
|
@@ -71959,6 +72277,7 @@ const variables = ({ asMdx } = { asMdx: true }) => tree => {
|
|
|
71959
72277
|
const name = expression.expression.property.type === 'Identifier'
|
|
71960
72278
|
? expression.expression.property.name
|
|
71961
72279
|
: expression.expression.property.value;
|
|
72280
|
+
const position = 'position' in node ? node.position : undefined;
|
|
71962
72281
|
const variable = asMdx
|
|
71963
72282
|
? {
|
|
71964
72283
|
type: 'mdxJsxTextElement',
|
|
@@ -71971,7 +72290,7 @@ const variables = ({ asMdx } = { asMdx: true }) => tree => {
|
|
|
71971
72290
|
},
|
|
71972
72291
|
],
|
|
71973
72292
|
children: [],
|
|
71974
|
-
position
|
|
72293
|
+
position,
|
|
71975
72294
|
}
|
|
71976
72295
|
: {
|
|
71977
72296
|
type: NodeTypes.variable,
|
|
@@ -71982,7 +72301,7 @@ const variables = ({ asMdx } = { asMdx: true }) => tree => {
|
|
|
71982
72301
|
},
|
|
71983
72302
|
},
|
|
71984
72303
|
value: `{${node.value}}`,
|
|
71985
|
-
position
|
|
72304
|
+
position,
|
|
71986
72305
|
};
|
|
71987
72306
|
parent.children.splice(index, 1, variable);
|
|
71988
72307
|
});
|
|
@@ -94026,15 +94345,18 @@ const evaluateExpressions = ({ context = {} } = {}) => tree => {
|
|
|
94026
94345
|
parent.children.splice(index, 1, {
|
|
94027
94346
|
type: 'text',
|
|
94028
94347
|
value: textValue,
|
|
94029
|
-
position:
|
|
94348
|
+
position: expressionNode.position,
|
|
94030
94349
|
});
|
|
94031
94350
|
}
|
|
94032
94351
|
catch (_error) {
|
|
94033
94352
|
// If evaluation fails, leave the expression as-is (fallback to text)
|
|
94353
|
+
// we still need to manually escape escaped characters because the expression
|
|
94354
|
+
// parser treats the contents as code instead of text, skipping the backslash escapes
|
|
94355
|
+
const processed = expression.replace(/\\([!-/:-@[-`{-~])/g, '$1');
|
|
94034
94356
|
parent.children.splice(index, 1, {
|
|
94035
94357
|
type: 'text',
|
|
94036
|
-
value: `{${
|
|
94037
|
-
position:
|
|
94358
|
+
value: `{${processed}}`,
|
|
94359
|
+
position: expressionNode.position,
|
|
94038
94360
|
});
|
|
94039
94361
|
}
|
|
94040
94362
|
});
|
|
@@ -94042,6 +94364,43 @@ const evaluateExpressions = ({ context = {} } = {}) => tree => {
|
|
|
94042
94364
|
};
|
|
94043
94365
|
/* harmony default export */ const evaluate_expressions = (evaluateExpressions);
|
|
94044
94366
|
|
|
94367
|
+
;// ./processor/transform/mdxish/heading-slugs.ts
|
|
94368
|
+
|
|
94369
|
+
|
|
94370
|
+
function isHeading(node) {
|
|
94371
|
+
return /^h[1-6]$/.test(node.tagName);
|
|
94372
|
+
}
|
|
94373
|
+
function textContent(node) {
|
|
94374
|
+
if (node.type === 'text')
|
|
94375
|
+
return node.value;
|
|
94376
|
+
// Process variable nodes by using their variable name for the id generation
|
|
94377
|
+
if (node.type === 'element' && node.tagName === 'variable' && node.properties?.name) {
|
|
94378
|
+
if (node.properties.isLegacy) {
|
|
94379
|
+
return node.properties.name;
|
|
94380
|
+
}
|
|
94381
|
+
return `user.${node.properties.name}`;
|
|
94382
|
+
}
|
|
94383
|
+
if ('children' in node)
|
|
94384
|
+
return node.children.map(textContent).join('');
|
|
94385
|
+
return '';
|
|
94386
|
+
}
|
|
94387
|
+
/**
|
|
94388
|
+
* Rehype plugin that constructs ids for headings
|
|
94389
|
+
* Id's are used to construct slug anchor links & Table of Contents during rendering
|
|
94390
|
+
* Use the text / nodes that make up the heading to generate the id
|
|
94391
|
+
*/
|
|
94392
|
+
const generateSlugForHeadings = () => (tree) => {
|
|
94393
|
+
const slugger = new BananaSlug();
|
|
94394
|
+
visit(tree, 'element', (node) => {
|
|
94395
|
+
if (isHeading(node) && !node.properties.id) {
|
|
94396
|
+
const text = node.children.map(textContent).join('');
|
|
94397
|
+
node.properties.id = slugger.slug(text);
|
|
94398
|
+
}
|
|
94399
|
+
});
|
|
94400
|
+
return tree;
|
|
94401
|
+
};
|
|
94402
|
+
/* harmony default export */ const heading_slugs = (generateSlugForHeadings);
|
|
94403
|
+
|
|
94045
94404
|
;// ./node_modules/rehype-parse/lib/index.js
|
|
94046
94405
|
/**
|
|
94047
94406
|
* @import {Root} from 'hast'
|
|
@@ -94126,11 +94485,11 @@ const MARKER_PATTERNS = [
|
|
|
94126
94485
|
// trailingSpace1 is for "** text **" pattern, trailingSpace2 is for "**text **" pattern
|
|
94127
94486
|
const asteriskBoldRegex = /([^*\s]+)?\s*(\*\*)(?:\s+((?:[^*\n]|\*(?!\*))+?)(\s*)\2|((?:[^*\n]|\*(?!\*))+?)(\s+)\2)(\S|$)?/g;
|
|
94128
94487
|
// Pattern for __ bold __
|
|
94129
|
-
const underscoreBoldRegex = /([^_\s]+)?\s*(__)(?:\s+((?:[^_\n]
|
|
94488
|
+
const underscoreBoldRegex = /([^_\s]+)?\s*(__)(?:\s+((?:__(?! )|_(?!_)|[^_\n])+?)(\s*)\2|((?:__(?! )|_(?!_)|[^_\n])+?)(\s+)\2)(\S|$)?/g;
|
|
94130
94489
|
// Pattern for * italic *
|
|
94131
94490
|
const asteriskItalicRegex = /([^*\s]+)?\s*(\*)(?!\*)(?:\s+([^*\n]+?)(\s*)\2|([^*\n]+?)(\s+)\2)(\S|$)?/g;
|
|
94132
94491
|
// Pattern for _ italic _
|
|
94133
|
-
const underscoreItalicRegex = /([^_\s]+)?\s*(_)(?!_)(?:\s+([^_\n]+?)(\s*)\2|([^_\n]+?)(\s+)\2)(\S|$)?/g;
|
|
94492
|
+
const underscoreItalicRegex = /([^_\s]+)?\s*(_)(?!_)(?:\s+((?:[^_\n]|_(?! ))+?)(\s*)\2|((?:[^_\n]|_(?! ))+?)(\s+)\2)(\S|$)?/g;
|
|
94134
94493
|
// CommonMark ignores intraword underscores or asteriks, but we want to italicize/bold the inner part
|
|
94135
94494
|
// Pattern for intraword _word_ in words like hello_world_
|
|
94136
94495
|
const intrawordUnderscoreItalicRegex = /(\w)_(?!_)([a-zA-Z0-9]+)_(?![\w_])/g;
|
|
@@ -94523,6 +94882,8 @@ const EMPTY_CODE_PLACEHOLDER = {
|
|
|
94523
94882
|
|
|
94524
94883
|
|
|
94525
94884
|
|
|
94885
|
+
|
|
94886
|
+
|
|
94526
94887
|
/**
|
|
94527
94888
|
* Wraps a node in a "pinned" container if sidebar: true is set.
|
|
94528
94889
|
*/
|
|
@@ -94561,9 +94922,17 @@ const preprocessBody = (text) => {
|
|
|
94561
94922
|
return ensureLeadingBreaks(text);
|
|
94562
94923
|
};
|
|
94563
94924
|
/** Markdown parser */
|
|
94564
|
-
const contentParser = unified()
|
|
94925
|
+
const contentParser = unified()
|
|
94926
|
+
.data('micromarkExtensions', [legacyVariable()])
|
|
94927
|
+
.data('fromMarkdownExtensions', [legacyVariableFromMarkdown()])
|
|
94928
|
+
.use(remarkParse)
|
|
94929
|
+
.use(remarkBreaks)
|
|
94930
|
+
.use(remarkGfm)
|
|
94931
|
+
.use(normalize_malformed_md_syntax);
|
|
94565
94932
|
/** Markdown to HTML processor (mdast → hast → HTML string) */
|
|
94566
94933
|
const markdownToHtml = unified()
|
|
94934
|
+
.data('micromarkExtensions', [legacyVariable()])
|
|
94935
|
+
.data('fromMarkdownExtensions', [legacyVariableFromMarkdown()])
|
|
94567
94936
|
.use(remarkParse)
|
|
94568
94937
|
.use(remarkGfm)
|
|
94569
94938
|
.use(normalize_malformed_md_syntax)
|
|
@@ -94676,7 +95045,13 @@ const parseTableCell = (text) => {
|
|
|
94676
95045
|
};
|
|
94677
95046
|
const parseBlock = (text) => {
|
|
94678
95047
|
if (!text.trim())
|
|
94679
|
-
return
|
|
95048
|
+
return textToBlock('');
|
|
95049
|
+
const tree = contentParser.runSync(contentParser.parse(text));
|
|
95050
|
+
return tree.children;
|
|
95051
|
+
};
|
|
95052
|
+
const parseInline = (text) => {
|
|
95053
|
+
if (!text.trim())
|
|
95054
|
+
return textToInline(text);
|
|
94680
95055
|
const tree = contentParser.runSync(contentParser.parse(text));
|
|
94681
95056
|
return tree.children;
|
|
94682
95057
|
};
|
|
@@ -94737,7 +95112,7 @@ function transformMagicBlock(blockType, data, rawValue, options = {}) {
|
|
|
94737
95112
|
const depth = headerJson.level || (compatibilityMode ? 1 : 2);
|
|
94738
95113
|
return [
|
|
94739
95114
|
wrapPinnedBlocks({
|
|
94740
|
-
children: 'title' in headerJson ?
|
|
95115
|
+
children: 'title' in headerJson ? parseInline(headerJson.title || '') : [],
|
|
94741
95116
|
depth,
|
|
94742
95117
|
type: 'heading',
|
|
94743
95118
|
}, data),
|
|
@@ -95854,6 +96229,9 @@ const restoreBooleanProperties = () => tree => {
|
|
|
95854
96229
|
|
|
95855
96230
|
const STANDALONE_HTML_LINE_REGEX = /^(<[a-z][^<>]*>|<\/[a-z][^<>]*>)+\s*$/;
|
|
95856
96231
|
const HTML_LINE_WITH_CONTENT_REGEX = /^<[a-z][^<>]*>.*<\/[a-z][^<>]*>(?:[^<]*)$/;
|
|
96232
|
+
function isLineHtml(line) {
|
|
96233
|
+
return STANDALONE_HTML_LINE_REGEX.test(line) || HTML_LINE_WITH_CONTENT_REGEX.test(line);
|
|
96234
|
+
}
|
|
95857
96235
|
/**
|
|
95858
96236
|
* Preprocessor to terminate HTML flow blocks.
|
|
95859
96237
|
*
|
|
@@ -95865,14 +96243,14 @@ const HTML_LINE_WITH_CONTENT_REGEX = /^<[a-z][^<>]*>.*<\/[a-z][^<>]*>(?:[^<]*)$/
|
|
|
95865
96243
|
* @link https://spec.commonmark.org/0.29/#html-blocks
|
|
95866
96244
|
*
|
|
95867
96245
|
* This preprocessor inserts a blank line after standalone HTML lines when the
|
|
95868
|
-
* next line is non-blank
|
|
95869
|
-
* and subsequent content is parsed independently.
|
|
96246
|
+
* next line is non-blank and not an HTML construct (because they still might be part of the HTML flow),
|
|
96247
|
+
* ensuring micromark's HTML flow tokenizer terminates and subsequent content is parsed independently.
|
|
95870
96248
|
*
|
|
95871
|
-
*
|
|
96249
|
+
* Conditions:
|
|
96250
|
+
* 1. Only targets non-indented lines with lowercase tag names. Uppercase tags
|
|
95872
96251
|
* (e.g., `<Table>`, `<MyComponent>`) are JSX custom components and don't
|
|
95873
96252
|
* trigger CommonMark HTML blocks, so they are left untouched.
|
|
95874
|
-
*
|
|
95875
|
-
* Lines inside fenced code blocks are skipped entirely.
|
|
96253
|
+
* 2. Lines inside protected blocks (e.g., code blocks) should be left untouched.
|
|
95876
96254
|
*/
|
|
95877
96255
|
function terminateHtmlFlowBlocks(content) {
|
|
95878
96256
|
const { protectedContent, protectedCode } = protectCodeBlocks(content);
|
|
@@ -95880,15 +96258,86 @@ function terminateHtmlFlowBlocks(content) {
|
|
|
95880
96258
|
const result = [];
|
|
95881
96259
|
for (let i = 0; i < lines.length; i += 1) {
|
|
95882
96260
|
result.push(lines[i]);
|
|
95883
|
-
|
|
95884
|
-
|
|
95885
|
-
|
|
96261
|
+
// Skip blank & indented lines
|
|
96262
|
+
if (i >= lines.length - 1 || lines[i + 1].trim().length === 0 || lines[i + 1].startsWith(' ') || lines[i + 1].startsWith('\t')) {
|
|
96263
|
+
// eslint-disable-next-line no-continue
|
|
96264
|
+
continue;
|
|
96265
|
+
}
|
|
96266
|
+
const isCurrentLineHtml = isLineHtml(lines[i]);
|
|
96267
|
+
const isNextLineHtml = isLineHtml(lines[i + 1]);
|
|
96268
|
+
if (isCurrentLineHtml && !isNextLineHtml) {
|
|
95886
96269
|
result.push('');
|
|
95887
96270
|
}
|
|
95888
96271
|
}
|
|
95889
96272
|
return restoreCodeBlocks(result.join('\n'), protectedCode);
|
|
95890
96273
|
}
|
|
95891
96274
|
|
|
96275
|
+
// EXTERNAL MODULE: external "@readme/variable"
|
|
96276
|
+
var variable_ = __webpack_require__(8167);
|
|
96277
|
+
var variable_default = /*#__PURE__*/__webpack_require__.n(variable_);
|
|
96278
|
+
;// ./processor/transform/mdxish/variables-code.ts
|
|
96279
|
+
|
|
96280
|
+
|
|
96281
|
+
// Single combined regex so that resolved values from one pattern are never re-scanned by the other.
|
|
96282
|
+
const COMBINED_VARIABLE_REGEX = new RegExp(`${variable_.VARIABLE_REGEXP}|${variable_.MDX_VARIABLE_REGEXP}`, 'giu');
|
|
96283
|
+
// Flatten variables into a single object for easy lookup
|
|
96284
|
+
function variables_code_flattenVariables(variables) {
|
|
96285
|
+
if (!variables)
|
|
96286
|
+
return {};
|
|
96287
|
+
return {
|
|
96288
|
+
...Object.fromEntries((variables.defaults || []).map(d => [d.name, d.default])),
|
|
96289
|
+
...variables.user,
|
|
96290
|
+
};
|
|
96291
|
+
}
|
|
96292
|
+
function resolveCodeVariables(value, resolvedVariables) {
|
|
96293
|
+
return value.replace(COMBINED_VARIABLE_REGEX, (match, legacyName, mdxEscapePrefix, mdxVarName, mdxEscapeSuffix) => {
|
|
96294
|
+
// Legacy variable: <<...>>
|
|
96295
|
+
if (legacyName !== undefined) {
|
|
96296
|
+
if (match.startsWith('\\<<') || match.endsWith('\\>>'))
|
|
96297
|
+
return match;
|
|
96298
|
+
const name = legacyName.trim();
|
|
96299
|
+
if (name.startsWith('glossary:'))
|
|
96300
|
+
return name.toUpperCase();
|
|
96301
|
+
return name in resolvedVariables ? resolvedVariables[name] : name.toUpperCase();
|
|
96302
|
+
}
|
|
96303
|
+
// MDX variable: {user.*}
|
|
96304
|
+
if (mdxEscapePrefix || mdxEscapeSuffix)
|
|
96305
|
+
return match;
|
|
96306
|
+
if (mdxVarName in resolvedVariables)
|
|
96307
|
+
return resolvedVariables[mdxVarName];
|
|
96308
|
+
const fullPath = match.slice(1, -1);
|
|
96309
|
+
return fullPath.toUpperCase();
|
|
96310
|
+
});
|
|
96311
|
+
}
|
|
96312
|
+
/**
|
|
96313
|
+
* A remark mdast plugin that resolves legacy variables <<...>> and MDX variables {user.*} inside code and inline code nodes
|
|
96314
|
+
* to their values. Uses regexes from the readme variable to search for variables in the code string.
|
|
96315
|
+
*
|
|
96316
|
+
* This is needed because variables in code blocks and inline cannot be tokenized, and also we need to maintain the code string
|
|
96317
|
+
* in the code nodes. This enables engine side variable resolution in codes which improves UX
|
|
96318
|
+
*/
|
|
96319
|
+
const variablesCodeResolver = ({ variables } = {}) => tree => {
|
|
96320
|
+
const resolvedVariables = variables_code_flattenVariables(variables);
|
|
96321
|
+
visit(tree, 'inlineCode', (node) => {
|
|
96322
|
+
if (!node.value)
|
|
96323
|
+
return;
|
|
96324
|
+
node.value = resolveCodeVariables(node.value, resolvedVariables);
|
|
96325
|
+
});
|
|
96326
|
+
visit(tree, 'code', (node) => {
|
|
96327
|
+
if (!node.value)
|
|
96328
|
+
return;
|
|
96329
|
+
const nextValue = resolveCodeVariables(node.value, resolvedVariables);
|
|
96330
|
+
node.value = nextValue;
|
|
96331
|
+
// Keep code-tabs/readme-components hProperties in sync with node.value
|
|
96332
|
+
// because renderers read `value` from hProperties.
|
|
96333
|
+
if (node.data?.hProperties && typeof node.data.hProperties === 'object') {
|
|
96334
|
+
node.data.hProperties.value = nextValue;
|
|
96335
|
+
}
|
|
96336
|
+
});
|
|
96337
|
+
return tree;
|
|
96338
|
+
};
|
|
96339
|
+
/* harmony default export */ const variables_code = (variablesCodeResolver);
|
|
96340
|
+
|
|
95892
96341
|
;// ./processor/transform/mdxish/variables-text.ts
|
|
95893
96342
|
|
|
95894
96343
|
|
|
@@ -95958,7 +96407,7 @@ const variablesTextTransformer = () => tree => {
|
|
|
95958
96407
|
/* harmony default export */ const variables_text = (variablesTextTransformer);
|
|
95959
96408
|
|
|
95960
96409
|
;// ./lib/mdast-util/magic-block/index.ts
|
|
95961
|
-
const
|
|
96410
|
+
const magic_block_contextMap = new WeakMap();
|
|
95962
96411
|
/**
|
|
95963
96412
|
* Find the magicBlock token in the token ancestry.
|
|
95964
96413
|
*/
|
|
@@ -95978,7 +96427,7 @@ function findMagicBlockToken() {
|
|
|
95978
96427
|
*/
|
|
95979
96428
|
function enterMagicBlock(token) {
|
|
95980
96429
|
// Initialize context for this magic block
|
|
95981
|
-
|
|
96430
|
+
magic_block_contextMap.set(token, { blockType: '', dataChunks: [] });
|
|
95982
96431
|
this.enter({
|
|
95983
96432
|
type: 'magicBlock',
|
|
95984
96433
|
blockType: '',
|
|
@@ -95993,7 +96442,7 @@ function exitMagicBlockType(token) {
|
|
|
95993
96442
|
const blockToken = findMagicBlockToken.call(this);
|
|
95994
96443
|
if (!blockToken)
|
|
95995
96444
|
return;
|
|
95996
|
-
const context =
|
|
96445
|
+
const context = magic_block_contextMap.get(blockToken);
|
|
95997
96446
|
if (context) {
|
|
95998
96447
|
context.blockType = this.sliceSerialize(token);
|
|
95999
96448
|
}
|
|
@@ -96005,7 +96454,7 @@ function exitMagicBlockData(token) {
|
|
|
96005
96454
|
const blockToken = findMagicBlockToken.call(this);
|
|
96006
96455
|
if (!blockToken)
|
|
96007
96456
|
return;
|
|
96008
|
-
const context =
|
|
96457
|
+
const context = magic_block_contextMap.get(blockToken);
|
|
96009
96458
|
if (context) {
|
|
96010
96459
|
context.dataChunks.push(this.sliceSerialize(token));
|
|
96011
96460
|
}
|
|
@@ -96017,7 +96466,7 @@ function exitMagicBlockLineEnding(token) {
|
|
|
96017
96466
|
const blockToken = findMagicBlockToken.call(this);
|
|
96018
96467
|
if (!blockToken)
|
|
96019
96468
|
return;
|
|
96020
|
-
const context =
|
|
96469
|
+
const context = magic_block_contextMap.get(blockToken);
|
|
96021
96470
|
if (context) {
|
|
96022
96471
|
context.dataChunks.push(this.sliceSerialize(token));
|
|
96023
96472
|
}
|
|
@@ -96035,7 +96484,7 @@ function exitMagicBlockMarkerEnd(token) {
|
|
|
96035
96484
|
// If this marker doesn't end with ']', it's a failed check and content belongs to data
|
|
96036
96485
|
// The successful end marker would be "[/block]"
|
|
96037
96486
|
if (!markerContent.endsWith(']') || markerContent !== '[/block]') {
|
|
96038
|
-
const context =
|
|
96487
|
+
const context = magic_block_contextMap.get(blockToken);
|
|
96039
96488
|
if (context) {
|
|
96040
96489
|
context.dataChunks.push(markerContent);
|
|
96041
96490
|
}
|
|
@@ -96045,7 +96494,7 @@ function exitMagicBlockMarkerEnd(token) {
|
|
|
96045
96494
|
* Exit handler: Finalize the magicBlock node with parsed JSON data.
|
|
96046
96495
|
*/
|
|
96047
96496
|
function exitMagicBlock(token) {
|
|
96048
|
-
const context =
|
|
96497
|
+
const context = magic_block_contextMap.get(token);
|
|
96049
96498
|
const node = this.stack[this.stack.length - 1];
|
|
96050
96499
|
if (context) {
|
|
96051
96500
|
const rawJson = context.dataChunks.join('');
|
|
@@ -96060,7 +96509,7 @@ function exitMagicBlock(token) {
|
|
|
96060
96509
|
node.data = {};
|
|
96061
96510
|
}
|
|
96062
96511
|
// Clean up context
|
|
96063
|
-
|
|
96512
|
+
magic_block_contextMap.delete(token);
|
|
96064
96513
|
}
|
|
96065
96514
|
this.exit(token);
|
|
96066
96515
|
}
|
|
@@ -96113,166 +96562,6 @@ function magicBlockToMarkdown() {
|
|
|
96113
96562
|
};
|
|
96114
96563
|
}
|
|
96115
96564
|
|
|
96116
|
-
;// ./node_modules/micromark-util-symbol/lib/codes.js
|
|
96117
|
-
/**
|
|
96118
|
-
* Character codes.
|
|
96119
|
-
*
|
|
96120
|
-
* This module is compiled away!
|
|
96121
|
-
*
|
|
96122
|
-
* micromark works based on character codes.
|
|
96123
|
-
* This module contains constants for the ASCII block and the replacement
|
|
96124
|
-
* character.
|
|
96125
|
-
* A couple of them are handled in a special way, such as the line endings
|
|
96126
|
-
* (CR, LF, and CR+LF, commonly known as end-of-line: EOLs), the tab (horizontal
|
|
96127
|
-
* tab) and its expansion based on what column it’s at (virtual space),
|
|
96128
|
-
* and the end-of-file (eof) character.
|
|
96129
|
-
* As values are preprocessed before handling them, the actual characters LF,
|
|
96130
|
-
* CR, HT, and NUL (which is present as the replacement character), are
|
|
96131
|
-
* guaranteed to not exist.
|
|
96132
|
-
*
|
|
96133
|
-
* Unicode basic latin block.
|
|
96134
|
-
*/
|
|
96135
|
-
const codes = /** @type {const} */ ({
|
|
96136
|
-
carriageReturn: -5,
|
|
96137
|
-
lineFeed: -4,
|
|
96138
|
-
carriageReturnLineFeed: -3,
|
|
96139
|
-
horizontalTab: -2,
|
|
96140
|
-
virtualSpace: -1,
|
|
96141
|
-
eof: null,
|
|
96142
|
-
nul: 0,
|
|
96143
|
-
soh: 1,
|
|
96144
|
-
stx: 2,
|
|
96145
|
-
etx: 3,
|
|
96146
|
-
eot: 4,
|
|
96147
|
-
enq: 5,
|
|
96148
|
-
ack: 6,
|
|
96149
|
-
bel: 7,
|
|
96150
|
-
bs: 8,
|
|
96151
|
-
ht: 9, // `\t`
|
|
96152
|
-
lf: 10, // `\n`
|
|
96153
|
-
vt: 11, // `\v`
|
|
96154
|
-
ff: 12, // `\f`
|
|
96155
|
-
cr: 13, // `\r`
|
|
96156
|
-
so: 14,
|
|
96157
|
-
si: 15,
|
|
96158
|
-
dle: 16,
|
|
96159
|
-
dc1: 17,
|
|
96160
|
-
dc2: 18,
|
|
96161
|
-
dc3: 19,
|
|
96162
|
-
dc4: 20,
|
|
96163
|
-
nak: 21,
|
|
96164
|
-
syn: 22,
|
|
96165
|
-
etb: 23,
|
|
96166
|
-
can: 24,
|
|
96167
|
-
em: 25,
|
|
96168
|
-
sub: 26,
|
|
96169
|
-
esc: 27,
|
|
96170
|
-
fs: 28,
|
|
96171
|
-
gs: 29,
|
|
96172
|
-
rs: 30,
|
|
96173
|
-
us: 31,
|
|
96174
|
-
space: 32,
|
|
96175
|
-
exclamationMark: 33, // `!`
|
|
96176
|
-
quotationMark: 34, // `"`
|
|
96177
|
-
numberSign: 35, // `#`
|
|
96178
|
-
dollarSign: 36, // `$`
|
|
96179
|
-
percentSign: 37, // `%`
|
|
96180
|
-
ampersand: 38, // `&`
|
|
96181
|
-
apostrophe: 39, // `'`
|
|
96182
|
-
leftParenthesis: 40, // `(`
|
|
96183
|
-
rightParenthesis: 41, // `)`
|
|
96184
|
-
asterisk: 42, // `*`
|
|
96185
|
-
plusSign: 43, // `+`
|
|
96186
|
-
comma: 44, // `,`
|
|
96187
|
-
dash: 45, // `-`
|
|
96188
|
-
dot: 46, // `.`
|
|
96189
|
-
slash: 47, // `/`
|
|
96190
|
-
digit0: 48, // `0`
|
|
96191
|
-
digit1: 49, // `1`
|
|
96192
|
-
digit2: 50, // `2`
|
|
96193
|
-
digit3: 51, // `3`
|
|
96194
|
-
digit4: 52, // `4`
|
|
96195
|
-
digit5: 53, // `5`
|
|
96196
|
-
digit6: 54, // `6`
|
|
96197
|
-
digit7: 55, // `7`
|
|
96198
|
-
digit8: 56, // `8`
|
|
96199
|
-
digit9: 57, // `9`
|
|
96200
|
-
colon: 58, // `:`
|
|
96201
|
-
semicolon: 59, // `;`
|
|
96202
|
-
lessThan: 60, // `<`
|
|
96203
|
-
equalsTo: 61, // `=`
|
|
96204
|
-
greaterThan: 62, // `>`
|
|
96205
|
-
questionMark: 63, // `?`
|
|
96206
|
-
atSign: 64, // `@`
|
|
96207
|
-
uppercaseA: 65, // `A`
|
|
96208
|
-
uppercaseB: 66, // `B`
|
|
96209
|
-
uppercaseC: 67, // `C`
|
|
96210
|
-
uppercaseD: 68, // `D`
|
|
96211
|
-
uppercaseE: 69, // `E`
|
|
96212
|
-
uppercaseF: 70, // `F`
|
|
96213
|
-
uppercaseG: 71, // `G`
|
|
96214
|
-
uppercaseH: 72, // `H`
|
|
96215
|
-
uppercaseI: 73, // `I`
|
|
96216
|
-
uppercaseJ: 74, // `J`
|
|
96217
|
-
uppercaseK: 75, // `K`
|
|
96218
|
-
uppercaseL: 76, // `L`
|
|
96219
|
-
uppercaseM: 77, // `M`
|
|
96220
|
-
uppercaseN: 78, // `N`
|
|
96221
|
-
uppercaseO: 79, // `O`
|
|
96222
|
-
uppercaseP: 80, // `P`
|
|
96223
|
-
uppercaseQ: 81, // `Q`
|
|
96224
|
-
uppercaseR: 82, // `R`
|
|
96225
|
-
uppercaseS: 83, // `S`
|
|
96226
|
-
uppercaseT: 84, // `T`
|
|
96227
|
-
uppercaseU: 85, // `U`
|
|
96228
|
-
uppercaseV: 86, // `V`
|
|
96229
|
-
uppercaseW: 87, // `W`
|
|
96230
|
-
uppercaseX: 88, // `X`
|
|
96231
|
-
uppercaseY: 89, // `Y`
|
|
96232
|
-
uppercaseZ: 90, // `Z`
|
|
96233
|
-
leftSquareBracket: 91, // `[`
|
|
96234
|
-
backslash: 92, // `\`
|
|
96235
|
-
rightSquareBracket: 93, // `]`
|
|
96236
|
-
caret: 94, // `^`
|
|
96237
|
-
underscore: 95, // `_`
|
|
96238
|
-
graveAccent: 96, // `` ` ``
|
|
96239
|
-
lowercaseA: 97, // `a`
|
|
96240
|
-
lowercaseB: 98, // `b`
|
|
96241
|
-
lowercaseC: 99, // `c`
|
|
96242
|
-
lowercaseD: 100, // `d`
|
|
96243
|
-
lowercaseE: 101, // `e`
|
|
96244
|
-
lowercaseF: 102, // `f`
|
|
96245
|
-
lowercaseG: 103, // `g`
|
|
96246
|
-
lowercaseH: 104, // `h`
|
|
96247
|
-
lowercaseI: 105, // `i`
|
|
96248
|
-
lowercaseJ: 106, // `j`
|
|
96249
|
-
lowercaseK: 107, // `k`
|
|
96250
|
-
lowercaseL: 108, // `l`
|
|
96251
|
-
lowercaseM: 109, // `m`
|
|
96252
|
-
lowercaseN: 110, // `n`
|
|
96253
|
-
lowercaseO: 111, // `o`
|
|
96254
|
-
lowercaseP: 112, // `p`
|
|
96255
|
-
lowercaseQ: 113, // `q`
|
|
96256
|
-
lowercaseR: 114, // `r`
|
|
96257
|
-
lowercaseS: 115, // `s`
|
|
96258
|
-
lowercaseT: 116, // `t`
|
|
96259
|
-
lowercaseU: 117, // `u`
|
|
96260
|
-
lowercaseV: 118, // `v`
|
|
96261
|
-
lowercaseW: 119, // `w`
|
|
96262
|
-
lowercaseX: 120, // `x`
|
|
96263
|
-
lowercaseY: 121, // `y`
|
|
96264
|
-
lowercaseZ: 122, // `z`
|
|
96265
|
-
leftCurlyBrace: 123, // `{`
|
|
96266
|
-
verticalBar: 124, // `|`
|
|
96267
|
-
rightCurlyBrace: 125, // `}`
|
|
96268
|
-
tilde: 126, // `~`
|
|
96269
|
-
del: 127,
|
|
96270
|
-
// Unicode Specials block.
|
|
96271
|
-
byteOrderMarker: 65_279,
|
|
96272
|
-
// Unicode Specials block.
|
|
96273
|
-
replacementCharacter: 65_533 // `�`
|
|
96274
|
-
})
|
|
96275
|
-
|
|
96276
96565
|
;// ./lib/micromark/magic-block/syntax.ts
|
|
96277
96566
|
|
|
96278
96567
|
|
|
@@ -97192,6 +97481,9 @@ function loadComponents() {
|
|
|
97192
97481
|
|
|
97193
97482
|
|
|
97194
97483
|
|
|
97484
|
+
|
|
97485
|
+
|
|
97486
|
+
|
|
97195
97487
|
|
|
97196
97488
|
|
|
97197
97489
|
|
|
@@ -97239,8 +97531,10 @@ function mdxishAstProcessor(mdContent, opts = {}) {
|
|
|
97239
97531
|
text: mdxExprExt.text,
|
|
97240
97532
|
};
|
|
97241
97533
|
const processor = unified()
|
|
97242
|
-
.data('micromarkExtensions', safeMode ? [magicBlock()] : [magicBlock(), mdxExprTextOnly])
|
|
97243
|
-
.data('fromMarkdownExtensions', safeMode
|
|
97534
|
+
.data('micromarkExtensions', safeMode ? [magicBlock(), legacyVariable()] : [magicBlock(), mdxExprTextOnly, legacyVariable()])
|
|
97535
|
+
.data('fromMarkdownExtensions', safeMode
|
|
97536
|
+
? [magicBlockFromMarkdown(), legacyVariableFromMarkdown()]
|
|
97537
|
+
: [magicBlockFromMarkdown(), mdxExpressionFromMarkdown(), legacyVariableFromMarkdown()])
|
|
97244
97538
|
.use(remarkParse)
|
|
97245
97539
|
.use(remarkFrontmatter)
|
|
97246
97540
|
.use(normalize_malformed_md_syntax)
|
|
@@ -97287,7 +97581,7 @@ function mdxishMdastToMd(mdast) {
|
|
|
97287
97581
|
* @see {@link https://github.com/readmeio/rmdx/blob/main/docs/mdxish-flow.md}
|
|
97288
97582
|
*/
|
|
97289
97583
|
function mdxish(mdContent, opts = {}) {
|
|
97290
|
-
const { components: userComponents = {} } = opts;
|
|
97584
|
+
const { components: userComponents = {}, variables } = opts;
|
|
97291
97585
|
const components = {
|
|
97292
97586
|
...loadComponents(),
|
|
97293
97587
|
...userComponents,
|
|
@@ -97295,12 +97589,13 @@ function mdxish(mdContent, opts = {}) {
|
|
|
97295
97589
|
const { processor, parserReadyContent } = mdxishAstProcessor(mdContent, opts);
|
|
97296
97590
|
processor
|
|
97297
97591
|
.use(remarkBreaks)
|
|
97592
|
+
.use(variables_code, { variables }) // Resolve <<...>> and {user.*} inside code and inline code nodes
|
|
97298
97593
|
.use(remarkRehype, { allowDangerousHtml: true, handlers: mdxComponentHandlers })
|
|
97299
97594
|
.use(preserveBooleanProperties) // RehypeRaw converts boolean properties to empty strings
|
|
97300
97595
|
.use(rehypeRaw, { passThrough: ['html-block'] })
|
|
97301
97596
|
.use(restoreBooleanProperties)
|
|
97302
97597
|
.use(mdxish_mermaid) // Add mermaid-render className to pre wrappers
|
|
97303
|
-
.use(
|
|
97598
|
+
.use(heading_slugs)
|
|
97304
97599
|
.use(rehypeMdxishComponents, {
|
|
97305
97600
|
components,
|
|
97306
97601
|
processMarkdown: (markdown) => mdxish(markdown, opts),
|
|
@@ -97440,9 +97735,6 @@ const migrate = (doc, opts) => {
|
|
|
97440
97735
|
};
|
|
97441
97736
|
/* harmony default export */ const lib_migrate = (migrate);
|
|
97442
97737
|
|
|
97443
|
-
// EXTERNAL MODULE: external "@readme/variable"
|
|
97444
|
-
var variable_ = __webpack_require__(8167);
|
|
97445
|
-
var variable_default = /*#__PURE__*/__webpack_require__.n(variable_);
|
|
97446
97738
|
// EXTERNAL MODULE: ./node_modules/rehype-react/index.js
|
|
97447
97739
|
var rehype_react = __webpack_require__(26);
|
|
97448
97740
|
var rehype_react_default = /*#__PURE__*/__webpack_require__.n(rehype_react);
|
|
@@ -97866,7 +98158,8 @@ async function stripComments(doc, { mdx, mdxish } = {}) {
|
|
|
97866
98158
|
if (mdxish) {
|
|
97867
98159
|
processor
|
|
97868
98160
|
.data('micromarkExtensions', [mdxExpression({ allowEmpty: true })])
|
|
97869
|
-
.data('fromMarkdownExtensions', [mdxExpressionFromMarkdown()])
|
|
98161
|
+
.data('fromMarkdownExtensions', [mdxExpressionFromMarkdown()])
|
|
98162
|
+
.data('toMarkdownExtensions', [mdxExpressionToMarkdown()]);
|
|
97870
98163
|
}
|
|
97871
98164
|
processor
|
|
97872
98165
|
.use(remarkParse)
|
|
@@ -97891,9 +98184,7 @@ async function stripComments(doc, { mdx, mdxish } = {}) {
|
|
|
97891
98184
|
// Our markdown renderer uses this to group these code blocks into a tabbed interface.
|
|
97892
98185
|
(left, right) => {
|
|
97893
98186
|
if (left.type === 'code' && right.type === 'code') {
|
|
97894
|
-
const isTight = left.position &&
|
|
97895
|
-
right.position &&
|
|
97896
|
-
right.position.start.line - left.position.end.line === 1; // Are the blocks on adjacent lines?
|
|
98187
|
+
const isTight = left.position && right.position && right.position.start.line - left.position.end.line === 1; // Are the blocks on adjacent lines?
|
|
97897
98188
|
// 0 = no newline between blocks
|
|
97898
98189
|
return isTight ? 0 : undefined;
|
|
97899
98190
|
}
|