@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.node.js
CHANGED
|
@@ -25091,12 +25091,12 @@ const parseOptions = (userOpts = {}) => {
|
|
|
25091
25091
|
return opts;
|
|
25092
25092
|
};
|
|
25093
25093
|
|
|
25094
|
-
;// ./node_modules/
|
|
25094
|
+
;// ./node_modules/github-slugger/regex.js
|
|
25095
25095
|
// This module is generated by `script/`.
|
|
25096
25096
|
/* eslint-disable no-control-regex, no-misleading-character-class, no-useless-escape */
|
|
25097
25097
|
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
|
|
25098
25098
|
|
|
25099
|
-
;// ./node_modules/
|
|
25099
|
+
;// ./node_modules/github-slugger/index.js
|
|
25100
25100
|
|
|
25101
25101
|
|
|
25102
25102
|
const own = Object.hasOwnProperty
|
|
@@ -73190,6 +73190,8 @@ function plain_one(node, opts) {
|
|
|
73190
73190
|
case 'variable':
|
|
73191
73191
|
case 'Variable': {
|
|
73192
73192
|
const key = node.properties.name.toString();
|
|
73193
|
+
if (opts.preserveVariableSyntax)
|
|
73194
|
+
return `{user.${key}}`;
|
|
73193
73195
|
const val = 'variables' in opts && opts.variables[key];
|
|
73194
73196
|
return val || key;
|
|
73195
73197
|
}
|
|
@@ -73213,6 +73215,8 @@ function plain_one(node, opts) {
|
|
|
73213
73215
|
if (node.type === 'mdxTextExpression') {
|
|
73214
73216
|
const key = extractMdxVariableKey(node);
|
|
73215
73217
|
if (key) {
|
|
73218
|
+
if (opts.preserveVariableSyntax)
|
|
73219
|
+
return `{user.${key}}`;
|
|
73216
73220
|
return ('variables' in opts && opts.variables[key]) || key;
|
|
73217
73221
|
}
|
|
73218
73222
|
}
|
|
@@ -91037,9 +91041,320 @@ const mdxToHast = () => tree => {
|
|
|
91037
91041
|
};
|
|
91038
91042
|
/* harmony default export */ const mdx_to_hast = (mdxToHast);
|
|
91039
91043
|
|
|
91044
|
+
;// ./lib/mdast-util/legacy-variable/index.ts
|
|
91045
|
+
|
|
91046
|
+
const contextMap = new WeakMap();
|
|
91047
|
+
function findlegacyVariableToken() {
|
|
91048
|
+
// tokenStack is micromark's current open token ancestry; find the nearest legacyVariable token.
|
|
91049
|
+
const events = this.tokenStack;
|
|
91050
|
+
for (let i = events.length - 1; i >= 0; i -= 1) {
|
|
91051
|
+
const token = events[i][0];
|
|
91052
|
+
if (token.type === 'legacyVariable')
|
|
91053
|
+
return token;
|
|
91054
|
+
}
|
|
91055
|
+
return undefined;
|
|
91056
|
+
}
|
|
91057
|
+
function enterlegacyVariable(token) {
|
|
91058
|
+
contextMap.set(token, { value: '' });
|
|
91059
|
+
}
|
|
91060
|
+
function exitlegacyVariableValue(token) {
|
|
91061
|
+
const variableToken = findlegacyVariableToken.call(this);
|
|
91062
|
+
if (!variableToken)
|
|
91063
|
+
return;
|
|
91064
|
+
const ctx = contextMap.get(variableToken);
|
|
91065
|
+
// Build up the variable characters
|
|
91066
|
+
if (ctx)
|
|
91067
|
+
ctx.value += this.sliceSerialize(token);
|
|
91068
|
+
}
|
|
91069
|
+
function exitlegacyVariable(token) {
|
|
91070
|
+
const ctx = contextMap.get(token);
|
|
91071
|
+
const serialized = this.sliceSerialize(token);
|
|
91072
|
+
const variableName = serialized.startsWith('<<') && serialized.endsWith('>>')
|
|
91073
|
+
? serialized.slice(2, -2)
|
|
91074
|
+
: ctx?.value ?? '';
|
|
91075
|
+
const nodePosition = {
|
|
91076
|
+
start: {
|
|
91077
|
+
offset: token.start.offset,
|
|
91078
|
+
line: token.start.line,
|
|
91079
|
+
column: token.start.column,
|
|
91080
|
+
},
|
|
91081
|
+
end: {
|
|
91082
|
+
offset: token.end.offset,
|
|
91083
|
+
line: token.end.line,
|
|
91084
|
+
column: token.end.column,
|
|
91085
|
+
},
|
|
91086
|
+
};
|
|
91087
|
+
if (variableName.startsWith('glossary:')) {
|
|
91088
|
+
const term = variableName.slice('glossary:'.length).trim();
|
|
91089
|
+
this.enter({
|
|
91090
|
+
type: NodeTypes.glossary,
|
|
91091
|
+
data: {
|
|
91092
|
+
hName: 'Glossary',
|
|
91093
|
+
hProperties: { term },
|
|
91094
|
+
},
|
|
91095
|
+
children: [{ type: 'text', value: term }],
|
|
91096
|
+
position: nodePosition,
|
|
91097
|
+
}, token);
|
|
91098
|
+
this.exit(token);
|
|
91099
|
+
contextMap.delete(token);
|
|
91100
|
+
return;
|
|
91101
|
+
}
|
|
91102
|
+
this.enter({
|
|
91103
|
+
type: NodeTypes.variable,
|
|
91104
|
+
data: {
|
|
91105
|
+
hName: 'Variable',
|
|
91106
|
+
hProperties: { name: variableName.trim(), isLegacy: true },
|
|
91107
|
+
},
|
|
91108
|
+
value: `<<${variableName}>>`,
|
|
91109
|
+
}, token);
|
|
91110
|
+
this.exit(token);
|
|
91111
|
+
contextMap.delete(token);
|
|
91112
|
+
}
|
|
91113
|
+
function legacyVariableFromMarkdown() {
|
|
91114
|
+
return {
|
|
91115
|
+
enter: {
|
|
91116
|
+
legacyVariable: enterlegacyVariable,
|
|
91117
|
+
},
|
|
91118
|
+
exit: {
|
|
91119
|
+
legacyVariableValue: exitlegacyVariableValue,
|
|
91120
|
+
legacyVariable: exitlegacyVariable,
|
|
91121
|
+
},
|
|
91122
|
+
};
|
|
91123
|
+
}
|
|
91124
|
+
|
|
91125
|
+
;// ./node_modules/micromark-util-symbol/lib/codes.js
|
|
91126
|
+
/**
|
|
91127
|
+
* Character codes.
|
|
91128
|
+
*
|
|
91129
|
+
* This module is compiled away!
|
|
91130
|
+
*
|
|
91131
|
+
* micromark works based on character codes.
|
|
91132
|
+
* This module contains constants for the ASCII block and the replacement
|
|
91133
|
+
* character.
|
|
91134
|
+
* A couple of them are handled in a special way, such as the line endings
|
|
91135
|
+
* (CR, LF, and CR+LF, commonly known as end-of-line: EOLs), the tab (horizontal
|
|
91136
|
+
* tab) and its expansion based on what column it’s at (virtual space),
|
|
91137
|
+
* and the end-of-file (eof) character.
|
|
91138
|
+
* As values are preprocessed before handling them, the actual characters LF,
|
|
91139
|
+
* CR, HT, and NUL (which is present as the replacement character), are
|
|
91140
|
+
* guaranteed to not exist.
|
|
91141
|
+
*
|
|
91142
|
+
* Unicode basic latin block.
|
|
91143
|
+
*/
|
|
91144
|
+
const codes = /** @type {const} */ ({
|
|
91145
|
+
carriageReturn: -5,
|
|
91146
|
+
lineFeed: -4,
|
|
91147
|
+
carriageReturnLineFeed: -3,
|
|
91148
|
+
horizontalTab: -2,
|
|
91149
|
+
virtualSpace: -1,
|
|
91150
|
+
eof: null,
|
|
91151
|
+
nul: 0,
|
|
91152
|
+
soh: 1,
|
|
91153
|
+
stx: 2,
|
|
91154
|
+
etx: 3,
|
|
91155
|
+
eot: 4,
|
|
91156
|
+
enq: 5,
|
|
91157
|
+
ack: 6,
|
|
91158
|
+
bel: 7,
|
|
91159
|
+
bs: 8,
|
|
91160
|
+
ht: 9, // `\t`
|
|
91161
|
+
lf: 10, // `\n`
|
|
91162
|
+
vt: 11, // `\v`
|
|
91163
|
+
ff: 12, // `\f`
|
|
91164
|
+
cr: 13, // `\r`
|
|
91165
|
+
so: 14,
|
|
91166
|
+
si: 15,
|
|
91167
|
+
dle: 16,
|
|
91168
|
+
dc1: 17,
|
|
91169
|
+
dc2: 18,
|
|
91170
|
+
dc3: 19,
|
|
91171
|
+
dc4: 20,
|
|
91172
|
+
nak: 21,
|
|
91173
|
+
syn: 22,
|
|
91174
|
+
etb: 23,
|
|
91175
|
+
can: 24,
|
|
91176
|
+
em: 25,
|
|
91177
|
+
sub: 26,
|
|
91178
|
+
esc: 27,
|
|
91179
|
+
fs: 28,
|
|
91180
|
+
gs: 29,
|
|
91181
|
+
rs: 30,
|
|
91182
|
+
us: 31,
|
|
91183
|
+
space: 32,
|
|
91184
|
+
exclamationMark: 33, // `!`
|
|
91185
|
+
quotationMark: 34, // `"`
|
|
91186
|
+
numberSign: 35, // `#`
|
|
91187
|
+
dollarSign: 36, // `$`
|
|
91188
|
+
percentSign: 37, // `%`
|
|
91189
|
+
ampersand: 38, // `&`
|
|
91190
|
+
apostrophe: 39, // `'`
|
|
91191
|
+
leftParenthesis: 40, // `(`
|
|
91192
|
+
rightParenthesis: 41, // `)`
|
|
91193
|
+
asterisk: 42, // `*`
|
|
91194
|
+
plusSign: 43, // `+`
|
|
91195
|
+
comma: 44, // `,`
|
|
91196
|
+
dash: 45, // `-`
|
|
91197
|
+
dot: 46, // `.`
|
|
91198
|
+
slash: 47, // `/`
|
|
91199
|
+
digit0: 48, // `0`
|
|
91200
|
+
digit1: 49, // `1`
|
|
91201
|
+
digit2: 50, // `2`
|
|
91202
|
+
digit3: 51, // `3`
|
|
91203
|
+
digit4: 52, // `4`
|
|
91204
|
+
digit5: 53, // `5`
|
|
91205
|
+
digit6: 54, // `6`
|
|
91206
|
+
digit7: 55, // `7`
|
|
91207
|
+
digit8: 56, // `8`
|
|
91208
|
+
digit9: 57, // `9`
|
|
91209
|
+
colon: 58, // `:`
|
|
91210
|
+
semicolon: 59, // `;`
|
|
91211
|
+
lessThan: 60, // `<`
|
|
91212
|
+
equalsTo: 61, // `=`
|
|
91213
|
+
greaterThan: 62, // `>`
|
|
91214
|
+
questionMark: 63, // `?`
|
|
91215
|
+
atSign: 64, // `@`
|
|
91216
|
+
uppercaseA: 65, // `A`
|
|
91217
|
+
uppercaseB: 66, // `B`
|
|
91218
|
+
uppercaseC: 67, // `C`
|
|
91219
|
+
uppercaseD: 68, // `D`
|
|
91220
|
+
uppercaseE: 69, // `E`
|
|
91221
|
+
uppercaseF: 70, // `F`
|
|
91222
|
+
uppercaseG: 71, // `G`
|
|
91223
|
+
uppercaseH: 72, // `H`
|
|
91224
|
+
uppercaseI: 73, // `I`
|
|
91225
|
+
uppercaseJ: 74, // `J`
|
|
91226
|
+
uppercaseK: 75, // `K`
|
|
91227
|
+
uppercaseL: 76, // `L`
|
|
91228
|
+
uppercaseM: 77, // `M`
|
|
91229
|
+
uppercaseN: 78, // `N`
|
|
91230
|
+
uppercaseO: 79, // `O`
|
|
91231
|
+
uppercaseP: 80, // `P`
|
|
91232
|
+
uppercaseQ: 81, // `Q`
|
|
91233
|
+
uppercaseR: 82, // `R`
|
|
91234
|
+
uppercaseS: 83, // `S`
|
|
91235
|
+
uppercaseT: 84, // `T`
|
|
91236
|
+
uppercaseU: 85, // `U`
|
|
91237
|
+
uppercaseV: 86, // `V`
|
|
91238
|
+
uppercaseW: 87, // `W`
|
|
91239
|
+
uppercaseX: 88, // `X`
|
|
91240
|
+
uppercaseY: 89, // `Y`
|
|
91241
|
+
uppercaseZ: 90, // `Z`
|
|
91242
|
+
leftSquareBracket: 91, // `[`
|
|
91243
|
+
backslash: 92, // `\`
|
|
91244
|
+
rightSquareBracket: 93, // `]`
|
|
91245
|
+
caret: 94, // `^`
|
|
91246
|
+
underscore: 95, // `_`
|
|
91247
|
+
graveAccent: 96, // `` ` ``
|
|
91248
|
+
lowercaseA: 97, // `a`
|
|
91249
|
+
lowercaseB: 98, // `b`
|
|
91250
|
+
lowercaseC: 99, // `c`
|
|
91251
|
+
lowercaseD: 100, // `d`
|
|
91252
|
+
lowercaseE: 101, // `e`
|
|
91253
|
+
lowercaseF: 102, // `f`
|
|
91254
|
+
lowercaseG: 103, // `g`
|
|
91255
|
+
lowercaseH: 104, // `h`
|
|
91256
|
+
lowercaseI: 105, // `i`
|
|
91257
|
+
lowercaseJ: 106, // `j`
|
|
91258
|
+
lowercaseK: 107, // `k`
|
|
91259
|
+
lowercaseL: 108, // `l`
|
|
91260
|
+
lowercaseM: 109, // `m`
|
|
91261
|
+
lowercaseN: 110, // `n`
|
|
91262
|
+
lowercaseO: 111, // `o`
|
|
91263
|
+
lowercaseP: 112, // `p`
|
|
91264
|
+
lowercaseQ: 113, // `q`
|
|
91265
|
+
lowercaseR: 114, // `r`
|
|
91266
|
+
lowercaseS: 115, // `s`
|
|
91267
|
+
lowercaseT: 116, // `t`
|
|
91268
|
+
lowercaseU: 117, // `u`
|
|
91269
|
+
lowercaseV: 118, // `v`
|
|
91270
|
+
lowercaseW: 119, // `w`
|
|
91271
|
+
lowercaseX: 120, // `x`
|
|
91272
|
+
lowercaseY: 121, // `y`
|
|
91273
|
+
lowercaseZ: 122, // `z`
|
|
91274
|
+
leftCurlyBrace: 123, // `{`
|
|
91275
|
+
verticalBar: 124, // `|`
|
|
91276
|
+
rightCurlyBrace: 125, // `}`
|
|
91277
|
+
tilde: 126, // `~`
|
|
91278
|
+
del: 127,
|
|
91279
|
+
// Unicode Specials block.
|
|
91280
|
+
byteOrderMarker: 65_279,
|
|
91281
|
+
// Unicode Specials block.
|
|
91282
|
+
replacementCharacter: 65_533 // `�`
|
|
91283
|
+
})
|
|
91284
|
+
|
|
91285
|
+
;// ./lib/micromark/legacy-variable/syntax.ts
|
|
91286
|
+
|
|
91287
|
+
|
|
91288
|
+
function isAllowedValueChar(code) {
|
|
91289
|
+
return (code !== null &&
|
|
91290
|
+
code !== codes.lessThan &&
|
|
91291
|
+
code !== codes.greaterThan &&
|
|
91292
|
+
!markdownLineEnding(code));
|
|
91293
|
+
}
|
|
91294
|
+
const legacyVariableConstruct = {
|
|
91295
|
+
name: 'legacyVariable',
|
|
91296
|
+
tokenize,
|
|
91297
|
+
};
|
|
91298
|
+
function tokenize(effects, ok, nok) {
|
|
91299
|
+
let hasValue = false;
|
|
91300
|
+
const start = (code) => {
|
|
91301
|
+
if (code !== codes.lessThan)
|
|
91302
|
+
return nok(code);
|
|
91303
|
+
effects.enter('legacyVariable');
|
|
91304
|
+
effects.enter('legacyVariableMarkerStart');
|
|
91305
|
+
effects.consume(code); // <
|
|
91306
|
+
return open2;
|
|
91307
|
+
};
|
|
91308
|
+
const open2 = (code) => {
|
|
91309
|
+
if (code !== codes.lessThan)
|
|
91310
|
+
return nok(code);
|
|
91311
|
+
effects.consume(code); // <<
|
|
91312
|
+
effects.exit('legacyVariableMarkerStart');
|
|
91313
|
+
effects.enter('legacyVariableValue');
|
|
91314
|
+
return value;
|
|
91315
|
+
};
|
|
91316
|
+
const value = (code) => {
|
|
91317
|
+
if (code === codes.greaterThan) {
|
|
91318
|
+
if (!hasValue)
|
|
91319
|
+
return nok(code);
|
|
91320
|
+
effects.exit('legacyVariableValue');
|
|
91321
|
+
effects.enter('legacyVariableMarkerEnd');
|
|
91322
|
+
effects.consume(code); // >
|
|
91323
|
+
return close2;
|
|
91324
|
+
}
|
|
91325
|
+
if (!isAllowedValueChar(code))
|
|
91326
|
+
return nok(code);
|
|
91327
|
+
hasValue = true;
|
|
91328
|
+
effects.consume(code);
|
|
91329
|
+
return value;
|
|
91330
|
+
};
|
|
91331
|
+
const close2 = (code) => {
|
|
91332
|
+
if (code !== codes.greaterThan)
|
|
91333
|
+
return nok(code);
|
|
91334
|
+
effects.consume(code); // >>
|
|
91335
|
+
effects.exit('legacyVariableMarkerEnd');
|
|
91336
|
+
effects.exit('legacyVariable');
|
|
91337
|
+
return ok;
|
|
91338
|
+
};
|
|
91339
|
+
return start;
|
|
91340
|
+
}
|
|
91341
|
+
function legacyVariable() {
|
|
91342
|
+
return {
|
|
91343
|
+
text: { [codes.lessThan]: legacyVariableConstruct },
|
|
91344
|
+
};
|
|
91345
|
+
}
|
|
91346
|
+
|
|
91347
|
+
;// ./lib/micromark/legacy-variable/index.ts
|
|
91348
|
+
/**
|
|
91349
|
+
* Micromark extension for <<variable>> / <<glossary:term>> inline syntax.
|
|
91350
|
+
*/
|
|
91351
|
+
|
|
91352
|
+
|
|
91040
91353
|
;// ./processor/transform/mdxish/mdxish-component-blocks.ts
|
|
91041
91354
|
|
|
91042
91355
|
|
|
91356
|
+
|
|
91357
|
+
|
|
91043
91358
|
const pascalCaseTagPattern = /^<([A-Z][A-Za-z0-9_]*)([^>]*?)(\/?)>([\s\S]*)?$/;
|
|
91044
91359
|
const tagAttributePattern = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*("[^"]*"|'[^']*'|[^\s"'>]+))?/g;
|
|
91045
91360
|
/**
|
|
@@ -91056,7 +91371,10 @@ const MAX_LOOKAHEAD = 30;
|
|
|
91056
91371
|
* Glossary and Anchor are inline components.
|
|
91057
91372
|
*/
|
|
91058
91373
|
const EXCLUDED_TAGS = new Set(['HTMLBlock', 'Table', 'Glossary', 'Anchor']);
|
|
91059
|
-
const inlineMdProcessor = unified()
|
|
91374
|
+
const inlineMdProcessor = unified()
|
|
91375
|
+
.data('micromarkExtensions', [legacyVariable()])
|
|
91376
|
+
.data('fromMarkdownExtensions', [legacyVariableFromMarkdown()])
|
|
91377
|
+
.use(remarkParse);
|
|
91060
91378
|
const isClosingTag = (value, tag) => value.trim() === `</${tag}>`;
|
|
91061
91379
|
/**
|
|
91062
91380
|
* Parse markdown content into mdast children nodes.
|
|
@@ -92163,6 +92481,7 @@ const variables = ({ asMdx } = { asMdx: true }) => tree => {
|
|
|
92163
92481
|
const name = expression.expression.property.type === 'Identifier'
|
|
92164
92482
|
? expression.expression.property.name
|
|
92165
92483
|
: expression.expression.property.value;
|
|
92484
|
+
const position = 'position' in node ? node.position : undefined;
|
|
92166
92485
|
const variable = asMdx
|
|
92167
92486
|
? {
|
|
92168
92487
|
type: 'mdxJsxTextElement',
|
|
@@ -92175,7 +92494,7 @@ const variables = ({ asMdx } = { asMdx: true }) => tree => {
|
|
|
92175
92494
|
},
|
|
92176
92495
|
],
|
|
92177
92496
|
children: [],
|
|
92178
|
-
position
|
|
92497
|
+
position,
|
|
92179
92498
|
}
|
|
92180
92499
|
: {
|
|
92181
92500
|
type: NodeTypes.variable,
|
|
@@ -92186,7 +92505,7 @@ const variables = ({ asMdx } = { asMdx: true }) => tree => {
|
|
|
92186
92505
|
},
|
|
92187
92506
|
},
|
|
92188
92507
|
value: `{${node.value}}`,
|
|
92189
|
-
position
|
|
92508
|
+
position,
|
|
92190
92509
|
};
|
|
92191
92510
|
parent.children.splice(index, 1, variable);
|
|
92192
92511
|
});
|
|
@@ -114230,15 +114549,18 @@ const evaluateExpressions = ({ context = {} } = {}) => tree => {
|
|
|
114230
114549
|
parent.children.splice(index, 1, {
|
|
114231
114550
|
type: 'text',
|
|
114232
114551
|
value: textValue,
|
|
114233
|
-
position:
|
|
114552
|
+
position: expressionNode.position,
|
|
114234
114553
|
});
|
|
114235
114554
|
}
|
|
114236
114555
|
catch (_error) {
|
|
114237
114556
|
// If evaluation fails, leave the expression as-is (fallback to text)
|
|
114557
|
+
// we still need to manually escape escaped characters because the expression
|
|
114558
|
+
// parser treats the contents as code instead of text, skipping the backslash escapes
|
|
114559
|
+
const processed = expression.replace(/\\([!-/:-@[-`{-~])/g, '$1');
|
|
114238
114560
|
parent.children.splice(index, 1, {
|
|
114239
114561
|
type: 'text',
|
|
114240
|
-
value: `{${
|
|
114241
|
-
position:
|
|
114562
|
+
value: `{${processed}}`,
|
|
114563
|
+
position: expressionNode.position,
|
|
114242
114564
|
});
|
|
114243
114565
|
}
|
|
114244
114566
|
});
|
|
@@ -114246,6 +114568,43 @@ const evaluateExpressions = ({ context = {} } = {}) => tree => {
|
|
|
114246
114568
|
};
|
|
114247
114569
|
/* harmony default export */ const evaluate_expressions = (evaluateExpressions);
|
|
114248
114570
|
|
|
114571
|
+
;// ./processor/transform/mdxish/heading-slugs.ts
|
|
114572
|
+
|
|
114573
|
+
|
|
114574
|
+
function isHeading(node) {
|
|
114575
|
+
return /^h[1-6]$/.test(node.tagName);
|
|
114576
|
+
}
|
|
114577
|
+
function textContent(node) {
|
|
114578
|
+
if (node.type === 'text')
|
|
114579
|
+
return node.value;
|
|
114580
|
+
// Process variable nodes by using their variable name for the id generation
|
|
114581
|
+
if (node.type === 'element' && node.tagName === 'variable' && node.properties?.name) {
|
|
114582
|
+
if (node.properties.isLegacy) {
|
|
114583
|
+
return node.properties.name;
|
|
114584
|
+
}
|
|
114585
|
+
return `user.${node.properties.name}`;
|
|
114586
|
+
}
|
|
114587
|
+
if ('children' in node)
|
|
114588
|
+
return node.children.map(textContent).join('');
|
|
114589
|
+
return '';
|
|
114590
|
+
}
|
|
114591
|
+
/**
|
|
114592
|
+
* Rehype plugin that constructs ids for headings
|
|
114593
|
+
* Id's are used to construct slug anchor links & Table of Contents during rendering
|
|
114594
|
+
* Use the text / nodes that make up the heading to generate the id
|
|
114595
|
+
*/
|
|
114596
|
+
const generateSlugForHeadings = () => (tree) => {
|
|
114597
|
+
const slugger = new BananaSlug();
|
|
114598
|
+
visit(tree, 'element', (node) => {
|
|
114599
|
+
if (isHeading(node) && !node.properties.id) {
|
|
114600
|
+
const text = node.children.map(textContent).join('');
|
|
114601
|
+
node.properties.id = slugger.slug(text);
|
|
114602
|
+
}
|
|
114603
|
+
});
|
|
114604
|
+
return tree;
|
|
114605
|
+
};
|
|
114606
|
+
/* harmony default export */ const heading_slugs = (generateSlugForHeadings);
|
|
114607
|
+
|
|
114249
114608
|
;// ./node_modules/rehype-parse/lib/index.js
|
|
114250
114609
|
/**
|
|
114251
114610
|
* @import {Root} from 'hast'
|
|
@@ -114330,11 +114689,11 @@ const MARKER_PATTERNS = [
|
|
|
114330
114689
|
// trailingSpace1 is for "** text **" pattern, trailingSpace2 is for "**text **" pattern
|
|
114331
114690
|
const asteriskBoldRegex = /([^*\s]+)?\s*(\*\*)(?:\s+((?:[^*\n]|\*(?!\*))+?)(\s*)\2|((?:[^*\n]|\*(?!\*))+?)(\s+)\2)(\S|$)?/g;
|
|
114332
114691
|
// Pattern for __ bold __
|
|
114333
|
-
const underscoreBoldRegex = /([^_\s]+)?\s*(__)(?:\s+((?:[^_\n]
|
|
114692
|
+
const underscoreBoldRegex = /([^_\s]+)?\s*(__)(?:\s+((?:__(?! )|_(?!_)|[^_\n])+?)(\s*)\2|((?:__(?! )|_(?!_)|[^_\n])+?)(\s+)\2)(\S|$)?/g;
|
|
114334
114693
|
// Pattern for * italic *
|
|
114335
114694
|
const asteriskItalicRegex = /([^*\s]+)?\s*(\*)(?!\*)(?:\s+([^*\n]+?)(\s*)\2|([^*\n]+?)(\s+)\2)(\S|$)?/g;
|
|
114336
114695
|
// Pattern for _ italic _
|
|
114337
|
-
const underscoreItalicRegex = /([^_\s]+)?\s*(_)(?!_)(?:\s+([^_\n]+?)(\s*)\2|([^_\n]+?)(\s+)\2)(\S|$)?/g;
|
|
114696
|
+
const underscoreItalicRegex = /([^_\s]+)?\s*(_)(?!_)(?:\s+((?:[^_\n]|_(?! ))+?)(\s*)\2|((?:[^_\n]|_(?! ))+?)(\s+)\2)(\S|$)?/g;
|
|
114338
114697
|
// CommonMark ignores intraword underscores or asteriks, but we want to italicize/bold the inner part
|
|
114339
114698
|
// Pattern for intraword _word_ in words like hello_world_
|
|
114340
114699
|
const intrawordUnderscoreItalicRegex = /(\w)_(?!_)([a-zA-Z0-9]+)_(?![\w_])/g;
|
|
@@ -114727,6 +115086,8 @@ const EMPTY_CODE_PLACEHOLDER = {
|
|
|
114727
115086
|
|
|
114728
115087
|
|
|
114729
115088
|
|
|
115089
|
+
|
|
115090
|
+
|
|
114730
115091
|
/**
|
|
114731
115092
|
* Wraps a node in a "pinned" container if sidebar: true is set.
|
|
114732
115093
|
*/
|
|
@@ -114765,9 +115126,17 @@ const preprocessBody = (text) => {
|
|
|
114765
115126
|
return ensureLeadingBreaks(text);
|
|
114766
115127
|
};
|
|
114767
115128
|
/** Markdown parser */
|
|
114768
|
-
const contentParser = unified()
|
|
115129
|
+
const contentParser = unified()
|
|
115130
|
+
.data('micromarkExtensions', [legacyVariable()])
|
|
115131
|
+
.data('fromMarkdownExtensions', [legacyVariableFromMarkdown()])
|
|
115132
|
+
.use(remarkParse)
|
|
115133
|
+
.use(remarkBreaks)
|
|
115134
|
+
.use(remarkGfm)
|
|
115135
|
+
.use(normalize_malformed_md_syntax);
|
|
114769
115136
|
/** Markdown to HTML processor (mdast → hast → HTML string) */
|
|
114770
115137
|
const markdownToHtml = unified()
|
|
115138
|
+
.data('micromarkExtensions', [legacyVariable()])
|
|
115139
|
+
.data('fromMarkdownExtensions', [legacyVariableFromMarkdown()])
|
|
114771
115140
|
.use(remarkParse)
|
|
114772
115141
|
.use(remarkGfm)
|
|
114773
115142
|
.use(normalize_malformed_md_syntax)
|
|
@@ -114880,7 +115249,13 @@ const parseTableCell = (text) => {
|
|
|
114880
115249
|
};
|
|
114881
115250
|
const parseBlock = (text) => {
|
|
114882
115251
|
if (!text.trim())
|
|
114883
|
-
return
|
|
115252
|
+
return textToBlock('');
|
|
115253
|
+
const tree = contentParser.runSync(contentParser.parse(text));
|
|
115254
|
+
return tree.children;
|
|
115255
|
+
};
|
|
115256
|
+
const parseInline = (text) => {
|
|
115257
|
+
if (!text.trim())
|
|
115258
|
+
return textToInline(text);
|
|
114884
115259
|
const tree = contentParser.runSync(contentParser.parse(text));
|
|
114885
115260
|
return tree.children;
|
|
114886
115261
|
};
|
|
@@ -114941,7 +115316,7 @@ function transformMagicBlock(blockType, data, rawValue, options = {}) {
|
|
|
114941
115316
|
const depth = headerJson.level || (compatibilityMode ? 1 : 2);
|
|
114942
115317
|
return [
|
|
114943
115318
|
wrapPinnedBlocks({
|
|
114944
|
-
children: 'title' in headerJson ?
|
|
115319
|
+
children: 'title' in headerJson ? parseInline(headerJson.title || '') : [],
|
|
114945
115320
|
depth,
|
|
114946
115321
|
type: 'heading',
|
|
114947
115322
|
}, data),
|
|
@@ -116058,6 +116433,9 @@ const restoreBooleanProperties = () => tree => {
|
|
|
116058
116433
|
|
|
116059
116434
|
const STANDALONE_HTML_LINE_REGEX = /^(<[a-z][^<>]*>|<\/[a-z][^<>]*>)+\s*$/;
|
|
116060
116435
|
const HTML_LINE_WITH_CONTENT_REGEX = /^<[a-z][^<>]*>.*<\/[a-z][^<>]*>(?:[^<]*)$/;
|
|
116436
|
+
function isLineHtml(line) {
|
|
116437
|
+
return STANDALONE_HTML_LINE_REGEX.test(line) || HTML_LINE_WITH_CONTENT_REGEX.test(line);
|
|
116438
|
+
}
|
|
116061
116439
|
/**
|
|
116062
116440
|
* Preprocessor to terminate HTML flow blocks.
|
|
116063
116441
|
*
|
|
@@ -116069,14 +116447,14 @@ const HTML_LINE_WITH_CONTENT_REGEX = /^<[a-z][^<>]*>.*<\/[a-z][^<>]*>(?:[^<]*)$/
|
|
|
116069
116447
|
* @link https://spec.commonmark.org/0.29/#html-blocks
|
|
116070
116448
|
*
|
|
116071
116449
|
* This preprocessor inserts a blank line after standalone HTML lines when the
|
|
116072
|
-
* next line is non-blank
|
|
116073
|
-
* and subsequent content is parsed independently.
|
|
116450
|
+
* next line is non-blank and not an HTML construct (because they still might be part of the HTML flow),
|
|
116451
|
+
* ensuring micromark's HTML flow tokenizer terminates and subsequent content is parsed independently.
|
|
116074
116452
|
*
|
|
116075
|
-
*
|
|
116453
|
+
* Conditions:
|
|
116454
|
+
* 1. Only targets non-indented lines with lowercase tag names. Uppercase tags
|
|
116076
116455
|
* (e.g., `<Table>`, `<MyComponent>`) are JSX custom components and don't
|
|
116077
116456
|
* trigger CommonMark HTML blocks, so they are left untouched.
|
|
116078
|
-
*
|
|
116079
|
-
* Lines inside fenced code blocks are skipped entirely.
|
|
116457
|
+
* 2. Lines inside protected blocks (e.g., code blocks) should be left untouched.
|
|
116080
116458
|
*/
|
|
116081
116459
|
function terminateHtmlFlowBlocks(content) {
|
|
116082
116460
|
const { protectedContent, protectedCode } = protectCodeBlocks(content);
|
|
@@ -116084,15 +116462,86 @@ function terminateHtmlFlowBlocks(content) {
|
|
|
116084
116462
|
const result = [];
|
|
116085
116463
|
for (let i = 0; i < lines.length; i += 1) {
|
|
116086
116464
|
result.push(lines[i]);
|
|
116087
|
-
|
|
116088
|
-
|
|
116089
|
-
|
|
116465
|
+
// Skip blank & indented lines
|
|
116466
|
+
if (i >= lines.length - 1 || lines[i + 1].trim().length === 0 || lines[i + 1].startsWith(' ') || lines[i + 1].startsWith('\t')) {
|
|
116467
|
+
// eslint-disable-next-line no-continue
|
|
116468
|
+
continue;
|
|
116469
|
+
}
|
|
116470
|
+
const isCurrentLineHtml = isLineHtml(lines[i]);
|
|
116471
|
+
const isNextLineHtml = isLineHtml(lines[i + 1]);
|
|
116472
|
+
if (isCurrentLineHtml && !isNextLineHtml) {
|
|
116090
116473
|
result.push('');
|
|
116091
116474
|
}
|
|
116092
116475
|
}
|
|
116093
116476
|
return restoreCodeBlocks(result.join('\n'), protectedCode);
|
|
116094
116477
|
}
|
|
116095
116478
|
|
|
116479
|
+
// EXTERNAL MODULE: ./node_modules/@readme/variable/dist/index.js
|
|
116480
|
+
var variable_dist = __webpack_require__(4355);
|
|
116481
|
+
var variable_dist_default = /*#__PURE__*/__webpack_require__.n(variable_dist);
|
|
116482
|
+
;// ./processor/transform/mdxish/variables-code.ts
|
|
116483
|
+
|
|
116484
|
+
|
|
116485
|
+
// Single combined regex so that resolved values from one pattern are never re-scanned by the other.
|
|
116486
|
+
const COMBINED_VARIABLE_REGEX = new RegExp(`${variable_dist.VARIABLE_REGEXP}|${variable_dist.MDX_VARIABLE_REGEXP}`, 'giu');
|
|
116487
|
+
// Flatten variables into a single object for easy lookup
|
|
116488
|
+
function variables_code_flattenVariables(variables) {
|
|
116489
|
+
if (!variables)
|
|
116490
|
+
return {};
|
|
116491
|
+
return {
|
|
116492
|
+
...Object.fromEntries((variables.defaults || []).map(d => [d.name, d.default])),
|
|
116493
|
+
...variables.user,
|
|
116494
|
+
};
|
|
116495
|
+
}
|
|
116496
|
+
function resolveCodeVariables(value, resolvedVariables) {
|
|
116497
|
+
return value.replace(COMBINED_VARIABLE_REGEX, (match, legacyName, mdxEscapePrefix, mdxVarName, mdxEscapeSuffix) => {
|
|
116498
|
+
// Legacy variable: <<...>>
|
|
116499
|
+
if (legacyName !== undefined) {
|
|
116500
|
+
if (match.startsWith('\\<<') || match.endsWith('\\>>'))
|
|
116501
|
+
return match;
|
|
116502
|
+
const name = legacyName.trim();
|
|
116503
|
+
if (name.startsWith('glossary:'))
|
|
116504
|
+
return name.toUpperCase();
|
|
116505
|
+
return name in resolvedVariables ? resolvedVariables[name] : name.toUpperCase();
|
|
116506
|
+
}
|
|
116507
|
+
// MDX variable: {user.*}
|
|
116508
|
+
if (mdxEscapePrefix || mdxEscapeSuffix)
|
|
116509
|
+
return match;
|
|
116510
|
+
if (mdxVarName in resolvedVariables)
|
|
116511
|
+
return resolvedVariables[mdxVarName];
|
|
116512
|
+
const fullPath = match.slice(1, -1);
|
|
116513
|
+
return fullPath.toUpperCase();
|
|
116514
|
+
});
|
|
116515
|
+
}
|
|
116516
|
+
/**
|
|
116517
|
+
* A remark mdast plugin that resolves legacy variables <<...>> and MDX variables {user.*} inside code and inline code nodes
|
|
116518
|
+
* to their values. Uses regexes from the readme variable to search for variables in the code string.
|
|
116519
|
+
*
|
|
116520
|
+
* This is needed because variables in code blocks and inline cannot be tokenized, and also we need to maintain the code string
|
|
116521
|
+
* in the code nodes. This enables engine side variable resolution in codes which improves UX
|
|
116522
|
+
*/
|
|
116523
|
+
const variablesCodeResolver = ({ variables } = {}) => tree => {
|
|
116524
|
+
const resolvedVariables = variables_code_flattenVariables(variables);
|
|
116525
|
+
visit(tree, 'inlineCode', (node) => {
|
|
116526
|
+
if (!node.value)
|
|
116527
|
+
return;
|
|
116528
|
+
node.value = resolveCodeVariables(node.value, resolvedVariables);
|
|
116529
|
+
});
|
|
116530
|
+
visit(tree, 'code', (node) => {
|
|
116531
|
+
if (!node.value)
|
|
116532
|
+
return;
|
|
116533
|
+
const nextValue = resolveCodeVariables(node.value, resolvedVariables);
|
|
116534
|
+
node.value = nextValue;
|
|
116535
|
+
// Keep code-tabs/readme-components hProperties in sync with node.value
|
|
116536
|
+
// because renderers read `value` from hProperties.
|
|
116537
|
+
if (node.data?.hProperties && typeof node.data.hProperties === 'object') {
|
|
116538
|
+
node.data.hProperties.value = nextValue;
|
|
116539
|
+
}
|
|
116540
|
+
});
|
|
116541
|
+
return tree;
|
|
116542
|
+
};
|
|
116543
|
+
/* harmony default export */ const variables_code = (variablesCodeResolver);
|
|
116544
|
+
|
|
116096
116545
|
;// ./processor/transform/mdxish/variables-text.ts
|
|
116097
116546
|
|
|
116098
116547
|
|
|
@@ -116162,7 +116611,7 @@ const variablesTextTransformer = () => tree => {
|
|
|
116162
116611
|
/* harmony default export */ const variables_text = (variablesTextTransformer);
|
|
116163
116612
|
|
|
116164
116613
|
;// ./lib/mdast-util/magic-block/index.ts
|
|
116165
|
-
const
|
|
116614
|
+
const magic_block_contextMap = new WeakMap();
|
|
116166
116615
|
/**
|
|
116167
116616
|
* Find the magicBlock token in the token ancestry.
|
|
116168
116617
|
*/
|
|
@@ -116182,7 +116631,7 @@ function findMagicBlockToken() {
|
|
|
116182
116631
|
*/
|
|
116183
116632
|
function enterMagicBlock(token) {
|
|
116184
116633
|
// Initialize context for this magic block
|
|
116185
|
-
|
|
116634
|
+
magic_block_contextMap.set(token, { blockType: '', dataChunks: [] });
|
|
116186
116635
|
this.enter({
|
|
116187
116636
|
type: 'magicBlock',
|
|
116188
116637
|
blockType: '',
|
|
@@ -116197,7 +116646,7 @@ function exitMagicBlockType(token) {
|
|
|
116197
116646
|
const blockToken = findMagicBlockToken.call(this);
|
|
116198
116647
|
if (!blockToken)
|
|
116199
116648
|
return;
|
|
116200
|
-
const context =
|
|
116649
|
+
const context = magic_block_contextMap.get(blockToken);
|
|
116201
116650
|
if (context) {
|
|
116202
116651
|
context.blockType = this.sliceSerialize(token);
|
|
116203
116652
|
}
|
|
@@ -116209,7 +116658,7 @@ function exitMagicBlockData(token) {
|
|
|
116209
116658
|
const blockToken = findMagicBlockToken.call(this);
|
|
116210
116659
|
if (!blockToken)
|
|
116211
116660
|
return;
|
|
116212
|
-
const context =
|
|
116661
|
+
const context = magic_block_contextMap.get(blockToken);
|
|
116213
116662
|
if (context) {
|
|
116214
116663
|
context.dataChunks.push(this.sliceSerialize(token));
|
|
116215
116664
|
}
|
|
@@ -116221,7 +116670,7 @@ function exitMagicBlockLineEnding(token) {
|
|
|
116221
116670
|
const blockToken = findMagicBlockToken.call(this);
|
|
116222
116671
|
if (!blockToken)
|
|
116223
116672
|
return;
|
|
116224
|
-
const context =
|
|
116673
|
+
const context = magic_block_contextMap.get(blockToken);
|
|
116225
116674
|
if (context) {
|
|
116226
116675
|
context.dataChunks.push(this.sliceSerialize(token));
|
|
116227
116676
|
}
|
|
@@ -116239,7 +116688,7 @@ function exitMagicBlockMarkerEnd(token) {
|
|
|
116239
116688
|
// If this marker doesn't end with ']', it's a failed check and content belongs to data
|
|
116240
116689
|
// The successful end marker would be "[/block]"
|
|
116241
116690
|
if (!markerContent.endsWith(']') || markerContent !== '[/block]') {
|
|
116242
|
-
const context =
|
|
116691
|
+
const context = magic_block_contextMap.get(blockToken);
|
|
116243
116692
|
if (context) {
|
|
116244
116693
|
context.dataChunks.push(markerContent);
|
|
116245
116694
|
}
|
|
@@ -116249,7 +116698,7 @@ function exitMagicBlockMarkerEnd(token) {
|
|
|
116249
116698
|
* Exit handler: Finalize the magicBlock node with parsed JSON data.
|
|
116250
116699
|
*/
|
|
116251
116700
|
function exitMagicBlock(token) {
|
|
116252
|
-
const context =
|
|
116701
|
+
const context = magic_block_contextMap.get(token);
|
|
116253
116702
|
const node = this.stack[this.stack.length - 1];
|
|
116254
116703
|
if (context) {
|
|
116255
116704
|
const rawJson = context.dataChunks.join('');
|
|
@@ -116264,7 +116713,7 @@ function exitMagicBlock(token) {
|
|
|
116264
116713
|
node.data = {};
|
|
116265
116714
|
}
|
|
116266
116715
|
// Clean up context
|
|
116267
|
-
|
|
116716
|
+
magic_block_contextMap.delete(token);
|
|
116268
116717
|
}
|
|
116269
116718
|
this.exit(token);
|
|
116270
116719
|
}
|
|
@@ -116317,166 +116766,6 @@ function magicBlockToMarkdown() {
|
|
|
116317
116766
|
};
|
|
116318
116767
|
}
|
|
116319
116768
|
|
|
116320
|
-
;// ./node_modules/micromark-util-symbol/lib/codes.js
|
|
116321
|
-
/**
|
|
116322
|
-
* Character codes.
|
|
116323
|
-
*
|
|
116324
|
-
* This module is compiled away!
|
|
116325
|
-
*
|
|
116326
|
-
* micromark works based on character codes.
|
|
116327
|
-
* This module contains constants for the ASCII block and the replacement
|
|
116328
|
-
* character.
|
|
116329
|
-
* A couple of them are handled in a special way, such as the line endings
|
|
116330
|
-
* (CR, LF, and CR+LF, commonly known as end-of-line: EOLs), the tab (horizontal
|
|
116331
|
-
* tab) and its expansion based on what column it’s at (virtual space),
|
|
116332
|
-
* and the end-of-file (eof) character.
|
|
116333
|
-
* As values are preprocessed before handling them, the actual characters LF,
|
|
116334
|
-
* CR, HT, and NUL (which is present as the replacement character), are
|
|
116335
|
-
* guaranteed to not exist.
|
|
116336
|
-
*
|
|
116337
|
-
* Unicode basic latin block.
|
|
116338
|
-
*/
|
|
116339
|
-
const codes = /** @type {const} */ ({
|
|
116340
|
-
carriageReturn: -5,
|
|
116341
|
-
lineFeed: -4,
|
|
116342
|
-
carriageReturnLineFeed: -3,
|
|
116343
|
-
horizontalTab: -2,
|
|
116344
|
-
virtualSpace: -1,
|
|
116345
|
-
eof: null,
|
|
116346
|
-
nul: 0,
|
|
116347
|
-
soh: 1,
|
|
116348
|
-
stx: 2,
|
|
116349
|
-
etx: 3,
|
|
116350
|
-
eot: 4,
|
|
116351
|
-
enq: 5,
|
|
116352
|
-
ack: 6,
|
|
116353
|
-
bel: 7,
|
|
116354
|
-
bs: 8,
|
|
116355
|
-
ht: 9, // `\t`
|
|
116356
|
-
lf: 10, // `\n`
|
|
116357
|
-
vt: 11, // `\v`
|
|
116358
|
-
ff: 12, // `\f`
|
|
116359
|
-
cr: 13, // `\r`
|
|
116360
|
-
so: 14,
|
|
116361
|
-
si: 15,
|
|
116362
|
-
dle: 16,
|
|
116363
|
-
dc1: 17,
|
|
116364
|
-
dc2: 18,
|
|
116365
|
-
dc3: 19,
|
|
116366
|
-
dc4: 20,
|
|
116367
|
-
nak: 21,
|
|
116368
|
-
syn: 22,
|
|
116369
|
-
etb: 23,
|
|
116370
|
-
can: 24,
|
|
116371
|
-
em: 25,
|
|
116372
|
-
sub: 26,
|
|
116373
|
-
esc: 27,
|
|
116374
|
-
fs: 28,
|
|
116375
|
-
gs: 29,
|
|
116376
|
-
rs: 30,
|
|
116377
|
-
us: 31,
|
|
116378
|
-
space: 32,
|
|
116379
|
-
exclamationMark: 33, // `!`
|
|
116380
|
-
quotationMark: 34, // `"`
|
|
116381
|
-
numberSign: 35, // `#`
|
|
116382
|
-
dollarSign: 36, // `$`
|
|
116383
|
-
percentSign: 37, // `%`
|
|
116384
|
-
ampersand: 38, // `&`
|
|
116385
|
-
apostrophe: 39, // `'`
|
|
116386
|
-
leftParenthesis: 40, // `(`
|
|
116387
|
-
rightParenthesis: 41, // `)`
|
|
116388
|
-
asterisk: 42, // `*`
|
|
116389
|
-
plusSign: 43, // `+`
|
|
116390
|
-
comma: 44, // `,`
|
|
116391
|
-
dash: 45, // `-`
|
|
116392
|
-
dot: 46, // `.`
|
|
116393
|
-
slash: 47, // `/`
|
|
116394
|
-
digit0: 48, // `0`
|
|
116395
|
-
digit1: 49, // `1`
|
|
116396
|
-
digit2: 50, // `2`
|
|
116397
|
-
digit3: 51, // `3`
|
|
116398
|
-
digit4: 52, // `4`
|
|
116399
|
-
digit5: 53, // `5`
|
|
116400
|
-
digit6: 54, // `6`
|
|
116401
|
-
digit7: 55, // `7`
|
|
116402
|
-
digit8: 56, // `8`
|
|
116403
|
-
digit9: 57, // `9`
|
|
116404
|
-
colon: 58, // `:`
|
|
116405
|
-
semicolon: 59, // `;`
|
|
116406
|
-
lessThan: 60, // `<`
|
|
116407
|
-
equalsTo: 61, // `=`
|
|
116408
|
-
greaterThan: 62, // `>`
|
|
116409
|
-
questionMark: 63, // `?`
|
|
116410
|
-
atSign: 64, // `@`
|
|
116411
|
-
uppercaseA: 65, // `A`
|
|
116412
|
-
uppercaseB: 66, // `B`
|
|
116413
|
-
uppercaseC: 67, // `C`
|
|
116414
|
-
uppercaseD: 68, // `D`
|
|
116415
|
-
uppercaseE: 69, // `E`
|
|
116416
|
-
uppercaseF: 70, // `F`
|
|
116417
|
-
uppercaseG: 71, // `G`
|
|
116418
|
-
uppercaseH: 72, // `H`
|
|
116419
|
-
uppercaseI: 73, // `I`
|
|
116420
|
-
uppercaseJ: 74, // `J`
|
|
116421
|
-
uppercaseK: 75, // `K`
|
|
116422
|
-
uppercaseL: 76, // `L`
|
|
116423
|
-
uppercaseM: 77, // `M`
|
|
116424
|
-
uppercaseN: 78, // `N`
|
|
116425
|
-
uppercaseO: 79, // `O`
|
|
116426
|
-
uppercaseP: 80, // `P`
|
|
116427
|
-
uppercaseQ: 81, // `Q`
|
|
116428
|
-
uppercaseR: 82, // `R`
|
|
116429
|
-
uppercaseS: 83, // `S`
|
|
116430
|
-
uppercaseT: 84, // `T`
|
|
116431
|
-
uppercaseU: 85, // `U`
|
|
116432
|
-
uppercaseV: 86, // `V`
|
|
116433
|
-
uppercaseW: 87, // `W`
|
|
116434
|
-
uppercaseX: 88, // `X`
|
|
116435
|
-
uppercaseY: 89, // `Y`
|
|
116436
|
-
uppercaseZ: 90, // `Z`
|
|
116437
|
-
leftSquareBracket: 91, // `[`
|
|
116438
|
-
backslash: 92, // `\`
|
|
116439
|
-
rightSquareBracket: 93, // `]`
|
|
116440
|
-
caret: 94, // `^`
|
|
116441
|
-
underscore: 95, // `_`
|
|
116442
|
-
graveAccent: 96, // `` ` ``
|
|
116443
|
-
lowercaseA: 97, // `a`
|
|
116444
|
-
lowercaseB: 98, // `b`
|
|
116445
|
-
lowercaseC: 99, // `c`
|
|
116446
|
-
lowercaseD: 100, // `d`
|
|
116447
|
-
lowercaseE: 101, // `e`
|
|
116448
|
-
lowercaseF: 102, // `f`
|
|
116449
|
-
lowercaseG: 103, // `g`
|
|
116450
|
-
lowercaseH: 104, // `h`
|
|
116451
|
-
lowercaseI: 105, // `i`
|
|
116452
|
-
lowercaseJ: 106, // `j`
|
|
116453
|
-
lowercaseK: 107, // `k`
|
|
116454
|
-
lowercaseL: 108, // `l`
|
|
116455
|
-
lowercaseM: 109, // `m`
|
|
116456
|
-
lowercaseN: 110, // `n`
|
|
116457
|
-
lowercaseO: 111, // `o`
|
|
116458
|
-
lowercaseP: 112, // `p`
|
|
116459
|
-
lowercaseQ: 113, // `q`
|
|
116460
|
-
lowercaseR: 114, // `r`
|
|
116461
|
-
lowercaseS: 115, // `s`
|
|
116462
|
-
lowercaseT: 116, // `t`
|
|
116463
|
-
lowercaseU: 117, // `u`
|
|
116464
|
-
lowercaseV: 118, // `v`
|
|
116465
|
-
lowercaseW: 119, // `w`
|
|
116466
|
-
lowercaseX: 120, // `x`
|
|
116467
|
-
lowercaseY: 121, // `y`
|
|
116468
|
-
lowercaseZ: 122, // `z`
|
|
116469
|
-
leftCurlyBrace: 123, // `{`
|
|
116470
|
-
verticalBar: 124, // `|`
|
|
116471
|
-
rightCurlyBrace: 125, // `}`
|
|
116472
|
-
tilde: 126, // `~`
|
|
116473
|
-
del: 127,
|
|
116474
|
-
// Unicode Specials block.
|
|
116475
|
-
byteOrderMarker: 65_279,
|
|
116476
|
-
// Unicode Specials block.
|
|
116477
|
-
replacementCharacter: 65_533 // `�`
|
|
116478
|
-
})
|
|
116479
|
-
|
|
116480
116769
|
;// ./lib/micromark/magic-block/syntax.ts
|
|
116481
116770
|
|
|
116482
116771
|
|
|
@@ -117396,6 +117685,9 @@ function loadComponents() {
|
|
|
117396
117685
|
|
|
117397
117686
|
|
|
117398
117687
|
|
|
117688
|
+
|
|
117689
|
+
|
|
117690
|
+
|
|
117399
117691
|
|
|
117400
117692
|
|
|
117401
117693
|
|
|
@@ -117443,8 +117735,10 @@ function mdxishAstProcessor(mdContent, opts = {}) {
|
|
|
117443
117735
|
text: mdxExprExt.text,
|
|
117444
117736
|
};
|
|
117445
117737
|
const processor = unified()
|
|
117446
|
-
.data('micromarkExtensions', safeMode ? [magicBlock()] : [magicBlock(), mdxExprTextOnly])
|
|
117447
|
-
.data('fromMarkdownExtensions', safeMode
|
|
117738
|
+
.data('micromarkExtensions', safeMode ? [magicBlock(), legacyVariable()] : [magicBlock(), mdxExprTextOnly, legacyVariable()])
|
|
117739
|
+
.data('fromMarkdownExtensions', safeMode
|
|
117740
|
+
? [magicBlockFromMarkdown(), legacyVariableFromMarkdown()]
|
|
117741
|
+
: [magicBlockFromMarkdown(), mdxExpressionFromMarkdown(), legacyVariableFromMarkdown()])
|
|
117448
117742
|
.use(remarkParse)
|
|
117449
117743
|
.use(remarkFrontmatter)
|
|
117450
117744
|
.use(normalize_malformed_md_syntax)
|
|
@@ -117491,7 +117785,7 @@ function mdxishMdastToMd(mdast) {
|
|
|
117491
117785
|
* @see {@link https://github.com/readmeio/rmdx/blob/main/docs/mdxish-flow.md}
|
|
117492
117786
|
*/
|
|
117493
117787
|
function mdxish(mdContent, opts = {}) {
|
|
117494
|
-
const { components: userComponents = {} } = opts;
|
|
117788
|
+
const { components: userComponents = {}, variables } = opts;
|
|
117495
117789
|
const components = {
|
|
117496
117790
|
...loadComponents(),
|
|
117497
117791
|
...userComponents,
|
|
@@ -117499,12 +117793,13 @@ function mdxish(mdContent, opts = {}) {
|
|
|
117499
117793
|
const { processor, parserReadyContent } = mdxishAstProcessor(mdContent, opts);
|
|
117500
117794
|
processor
|
|
117501
117795
|
.use(remarkBreaks)
|
|
117796
|
+
.use(variables_code, { variables }) // Resolve <<...>> and {user.*} inside code and inline code nodes
|
|
117502
117797
|
.use(remarkRehype, { allowDangerousHtml: true, handlers: mdxComponentHandlers })
|
|
117503
117798
|
.use(preserveBooleanProperties) // RehypeRaw converts boolean properties to empty strings
|
|
117504
117799
|
.use(rehypeRaw, { passThrough: ['html-block'] })
|
|
117505
117800
|
.use(restoreBooleanProperties)
|
|
117506
117801
|
.use(mdxish_mermaid) // Add mermaid-render className to pre wrappers
|
|
117507
|
-
.use(
|
|
117802
|
+
.use(heading_slugs)
|
|
117508
117803
|
.use(rehypeMdxishComponents, {
|
|
117509
117804
|
components,
|
|
117510
117805
|
processMarkdown: (markdown) => mdxish(markdown, opts),
|
|
@@ -117644,9 +117939,6 @@ const migrate = (doc, opts) => {
|
|
|
117644
117939
|
};
|
|
117645
117940
|
/* harmony default export */ const lib_migrate = (migrate);
|
|
117646
117941
|
|
|
117647
|
-
// EXTERNAL MODULE: ./node_modules/@readme/variable/dist/index.js
|
|
117648
|
-
var variable_dist = __webpack_require__(4355);
|
|
117649
|
-
var variable_dist_default = /*#__PURE__*/__webpack_require__.n(variable_dist);
|
|
117650
117942
|
// EXTERNAL MODULE: ./node_modules/rehype-react/index.js
|
|
117651
117943
|
var rehype_react = __webpack_require__(26);
|
|
117652
117944
|
var rehype_react_default = /*#__PURE__*/__webpack_require__.n(rehype_react);
|
|
@@ -118070,7 +118362,8 @@ async function stripComments(doc, { mdx, mdxish } = {}) {
|
|
|
118070
118362
|
if (mdxish) {
|
|
118071
118363
|
processor
|
|
118072
118364
|
.data('micromarkExtensions', [mdxExpression({ allowEmpty: true })])
|
|
118073
|
-
.data('fromMarkdownExtensions', [mdxExpressionFromMarkdown()])
|
|
118365
|
+
.data('fromMarkdownExtensions', [mdxExpressionFromMarkdown()])
|
|
118366
|
+
.data('toMarkdownExtensions', [mdxExpressionToMarkdown()]);
|
|
118074
118367
|
}
|
|
118075
118368
|
processor
|
|
118076
118369
|
.use(remarkParse)
|
|
@@ -118095,9 +118388,7 @@ async function stripComments(doc, { mdx, mdxish } = {}) {
|
|
|
118095
118388
|
// Our markdown renderer uses this to group these code blocks into a tabbed interface.
|
|
118096
118389
|
(left, right) => {
|
|
118097
118390
|
if (left.type === 'code' && right.type === 'code') {
|
|
118098
|
-
const isTight = left.position &&
|
|
118099
|
-
right.position &&
|
|
118100
|
-
right.position.start.line - left.position.end.line === 1; // Are the blocks on adjacent lines?
|
|
118391
|
+
const isTight = left.position && right.position && right.position.start.line - left.position.end.line === 1; // Are the blocks on adjacent lines?
|
|
118101
118392
|
// 0 = no newline between blocks
|
|
118102
118393
|
return isTight ? 0 : undefined;
|
|
118103
118394
|
}
|