@astrojs/markdoc 0.11.2 → 1.0.0-alpha.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/components/TreeNode.ts
CHANGED
|
@@ -42,7 +42,7 @@ export const ComponentNode = createComponent({
|
|
|
42
42
|
const slots = {
|
|
43
43
|
default: () =>
|
|
44
44
|
render`${treeNode.children.map((child) =>
|
|
45
|
-
renderComponent(result, 'ComponentNode', ComponentNode, { treeNode: child })
|
|
45
|
+
renderComponent(result, 'ComponentNode', ComponentNode, { treeNode: child }),
|
|
46
46
|
)}`,
|
|
47
47
|
};
|
|
48
48
|
if (treeNode.type === 'component') {
|
|
@@ -55,7 +55,7 @@ export const ComponentNode = createComponent({
|
|
|
55
55
|
renderUniqueStylesheet(result, {
|
|
56
56
|
type: 'inline',
|
|
57
57
|
content: style,
|
|
58
|
-
})
|
|
58
|
+
}),
|
|
59
59
|
)
|
|
60
60
|
.join('');
|
|
61
61
|
}
|
|
@@ -84,8 +84,8 @@ export const ComponentNode = createComponent({
|
|
|
84
84
|
treeNode.component.name,
|
|
85
85
|
treeNode.component,
|
|
86
86
|
treeNode.props,
|
|
87
|
-
slots
|
|
88
|
-
)}
|
|
87
|
+
slots,
|
|
88
|
+
)}`,
|
|
89
89
|
);
|
|
90
90
|
|
|
91
91
|
// Let the runtime know that this component is being used.
|
|
@@ -194,7 +194,7 @@ function raiseValidationErrors({
|
|
|
194
194
|
// so we cannot validate them at build time.
|
|
195
195
|
e.error.id !== "variable-undefined" && // Ignore missing partial errors.
|
|
196
196
|
// We will resolve these in `resolvePartials`.
|
|
197
|
-
!(e.error.id === "attribute-value-invalid" &&
|
|
197
|
+
!(e.error.id === "attribute-value-invalid" && /^Partial .+ not found/.test(e.error.message));
|
|
198
198
|
});
|
|
199
199
|
if (validationErrors.length) {
|
|
200
200
|
const frontmatterBlockOffset = entry.rawData.split("\n").length + 2;
|
|
@@ -218,7 +218,7 @@ function getUsedTags(markdocAst) {
|
|
|
218
218
|
const validationErrors = Markdoc.validate(markdocAst);
|
|
219
219
|
for (const { error } of validationErrors) {
|
|
220
220
|
if (error.id === "tag-undefined") {
|
|
221
|
-
const [, tagName] =
|
|
221
|
+
const [, tagName] = /Undefined tag: '(.*)'/.exec(error.message) ?? [];
|
|
222
222
|
tags.add(tagName);
|
|
223
223
|
}
|
|
224
224
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrojs/markdoc",
|
|
3
3
|
"description": "Add support for Markdoc in your Astro site",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "1.0.0-alpha.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"author": "withastro",
|
|
@@ -61,22 +61,19 @@
|
|
|
61
61
|
"github-slugger": "^2.0.0",
|
|
62
62
|
"gray-matter": "^4.0.3",
|
|
63
63
|
"htmlparser2": "^9.1.0",
|
|
64
|
-
"kleur": "^4.1.5",
|
|
65
|
-
"zod": "^3.23.8",
|
|
66
64
|
"@astrojs/internal-helpers": "0.4.1",
|
|
67
|
-
"@astrojs/markdown-remark": "
|
|
65
|
+
"@astrojs/markdown-remark": "6.0.0-alpha.0",
|
|
68
66
|
"@astrojs/prism": "3.1.0"
|
|
69
67
|
},
|
|
70
68
|
"peerDependencies": {
|
|
71
|
-
"astro": "^
|
|
69
|
+
"astro": "^5.0.0-alpha.0"
|
|
72
70
|
},
|
|
73
71
|
"devDependencies": {
|
|
74
|
-
"@types/
|
|
75
|
-
"@types/markdown-it": "^14.1.1",
|
|
72
|
+
"@types/markdown-it": "^14.1.2",
|
|
76
73
|
"devalue": "^5.0.0",
|
|
77
74
|
"linkedom": "^0.18.4",
|
|
78
|
-
"vite": "^5.
|
|
79
|
-
"astro": "
|
|
75
|
+
"vite": "^5.4.1",
|
|
76
|
+
"astro": "5.0.0-alpha.0",
|
|
80
77
|
"astro-scripts": "0.0.14"
|
|
81
78
|
},
|
|
82
79
|
"engines": {
|