@mintlify/cli 4.0.1524 → 4.0.1525
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/bin/vendor/converter.js
CHANGED
|
@@ -1263,7 +1263,8 @@ import remarkFrontmatter from "remark-frontmatter";
|
|
|
1263
1263
|
import remarkGfm from "remark-gfm";
|
|
1264
1264
|
import remarkMath from "remark-math";
|
|
1265
1265
|
import remarkMdx from "remark-mdx";
|
|
1266
|
-
var coreRemark = remark().use(remarkMdx).use(remarkGfm).use(remarkFrontmatter, ["yaml", "toml"]).
|
|
1266
|
+
var coreRemark = remark().use(remarkMdx).use(remarkGfm).use(remarkFrontmatter, ["yaml", "toml"]).freeze();
|
|
1267
|
+
var mathRemark = coreRemark().use(remarkMath).freeze();
|
|
1267
1268
|
function convertHtmlCommentsToJsx(mdx) {
|
|
1268
1269
|
const parts = mdx.split(/(```[\s\S]*?```|~~~[\s\S]*?~~~)/);
|
|
1269
1270
|
return parts.map((part, i) => i % 2 === 0 ? part.replace(/<!--([\s\S]*?)-->/g, (_m, c) => `{/* ${c} */}`) : part).join("");
|
|
@@ -1276,13 +1277,13 @@ function preprocessMdxSource(mdx, options = {}) {
|
|
|
1276
1277
|
preprocessed: preprocessCustomHeadingIds(sanitized, { preserveOriginal: true })
|
|
1277
1278
|
};
|
|
1278
1279
|
}
|
|
1279
|
-
function parsePreprocessedMdx(preprocessed) {
|
|
1280
|
-
return coreRemark().parse(preprocessed);
|
|
1280
|
+
function parsePreprocessedMdx(preprocessed, math = true) {
|
|
1281
|
+
return (math ? mathRemark : coreRemark)().parse(preprocessed);
|
|
1281
1282
|
}
|
|
1282
1283
|
function mdxToMdast(mdx, options = {
|
|
1283
1284
|
omitHtmlComments: true
|
|
1284
1285
|
}) {
|
|
1285
|
-
return parsePreprocessedMdx(preprocessMdxSource(mdx, options).preprocessed);
|
|
1286
|
+
return parsePreprocessedMdx(preprocessMdxSource(mdx, options).preprocessed, options.math);
|
|
1286
1287
|
}
|
|
1287
1288
|
|
|
1288
1289
|
// ../editor/dist/converter/parse/handlers/prompt.js
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1525",
|
|
4
4
|
"description": "The Mintlify CLI",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"keytar": "7.9.0"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
|
-
"@mintlify/editor": "0.0.
|
|
89
|
+
"@mintlify/editor": "0.0.408",
|
|
90
90
|
"@mintlify/ts-config": "2.0.2",
|
|
91
91
|
"@tsconfig/recommended": "1.0.2",
|
|
92
92
|
"@types/detect-port": "1.3.2",
|
|
@@ -105,5 +105,5 @@
|
|
|
105
105
|
"vitest": "2.1.9",
|
|
106
106
|
"vitest-mock-process": "1.0.4"
|
|
107
107
|
},
|
|
108
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "199afc175313f48c75d601dbe066195bc2d9e7fe"
|
|
109
109
|
}
|