@astrojs/markdown-remark 7.1.0 → 7.1.1
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Slugger from "github-slugger";
|
|
2
2
|
import { visit } from "unist-util-visit";
|
|
3
|
+
import { FORBIDDEN_PATH_KEYS } from "@astrojs/internal-helpers/object";
|
|
3
4
|
const rawNodeTypes = /* @__PURE__ */ new Set(["text", "raw", "mdxTextExpression"]);
|
|
4
5
|
const codeTagNames = /* @__PURE__ */ new Set(["code", "pre"]);
|
|
5
6
|
function rehypeHeadingIds() {
|
|
@@ -78,7 +79,9 @@ function getMdxFrontmatterVariablePath(node) {
|
|
|
78
79
|
function getMdxFrontmatterVariableValue(frontmatter, path) {
|
|
79
80
|
let value = frontmatter;
|
|
80
81
|
for (const key of path) {
|
|
81
|
-
if (!value
|
|
82
|
+
if (FORBIDDEN_PATH_KEYS.has(key) || !value || typeof value !== "object" || !Object.hasOwn(value, key)) {
|
|
83
|
+
return void 0;
|
|
84
|
+
}
|
|
82
85
|
value = value[key];
|
|
83
86
|
}
|
|
84
87
|
return value;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrojs/markdown-remark",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "withastro",
|
|
6
6
|
"license": "MIT",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"unist-util-visit": "^5.1.0",
|
|
50
50
|
"unist-util-visit-parents": "^6.0.2",
|
|
51
51
|
"vfile": "^6.0.3",
|
|
52
|
-
"@astrojs/internal-helpers": "0.
|
|
52
|
+
"@astrojs/internal-helpers": "0.9.0",
|
|
53
53
|
"@astrojs/prism": "4.0.1"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
"build": "astro-scripts build \"src/**/*.ts\" && tsc -p tsconfig.json",
|
|
71
71
|
"build:ci": "astro-scripts build \"src/**/*.ts\"",
|
|
72
72
|
"dev": "astro-scripts dev \"src/**/*.ts\"",
|
|
73
|
-
"test": "astro-scripts test \"test/**/*.test.
|
|
73
|
+
"test": "astro-scripts test \"test/**/*.test.ts\"",
|
|
74
|
+
"typecheck:tests": "tsc --build tsconfig.test.json"
|
|
74
75
|
}
|
|
75
76
|
}
|