@markdoc/markdoc 0.3.1 → 0.3.2
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/index.js +4 -2
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +2 -2
- package/dist/src/transformer.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/transformer.ts +1 -0
- package/src/validator.test.ts +28 -1
- package/src/validator.ts +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6870,6 +6870,8 @@ var transformer_default = {
|
|
|
6870
6870
|
}
|
|
6871
6871
|
if (schema.slots) {
|
|
6872
6872
|
for (const [key, slot2] of Object.entries(schema.slots)) {
|
|
6873
|
+
if (slot2.render === false)
|
|
6874
|
+
continue;
|
|
6873
6875
|
const name = typeof slot2.render === "string" ? slot2.render : key;
|
|
6874
6876
|
if (node2.slots[key])
|
|
6875
6877
|
output[name] = this.node(node2.slots[key], config);
|
|
@@ -8513,8 +8515,8 @@ function validateTree(content, config) {
|
|
|
8513
8515
|
const output = [...walkWithParents(content)].map(([node2, parents]) => {
|
|
8514
8516
|
const { type, lines, location } = node2;
|
|
8515
8517
|
const updatedConfig = {
|
|
8516
|
-
|
|
8517
|
-
...config
|
|
8518
|
+
...config,
|
|
8519
|
+
validation: { ...config.validation, parents }
|
|
8518
8520
|
};
|
|
8519
8521
|
const errors = validator(node2, updatedConfig);
|
|
8520
8522
|
if (isPromise(errors)) {
|