pro-editor-schema 0.1.188 → 0.1.189
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 +14 -14
- package/dist/index.mjs +14 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2704,19 +2704,6 @@ var validateChildren = (element, schema, inheritedForbiddenScope) => {
|
|
|
2704
2704
|
}
|
|
2705
2705
|
for (const child of childElements) {
|
|
2706
2706
|
const childTag = child.tagName.toUpperCase();
|
|
2707
|
-
const allowedChild = allowedChildren.find(
|
|
2708
|
-
(candidate) => candidate.tagName === childTag
|
|
2709
|
-
);
|
|
2710
|
-
if (!allowedChild) {
|
|
2711
|
-
addValidationIssue(errors, {
|
|
2712
|
-
store: getStore(child),
|
|
2713
|
-
title: `Forbidden child element ${child.tagName}`,
|
|
2714
|
-
level: "warning",
|
|
2715
|
-
kind: "forbidden",
|
|
2716
|
-
description: `The child element ${child.tagName} is not allowed in this context.`
|
|
2717
|
-
});
|
|
2718
|
-
continue;
|
|
2719
|
-
}
|
|
2720
2707
|
const childSchema = findSchemaByElement(child);
|
|
2721
2708
|
if (!childSchema) {
|
|
2722
2709
|
addValidationIssue(errors, {
|
|
@@ -2733,7 +2720,7 @@ var validateChildren = (element, schema, inheritedForbiddenScope) => {
|
|
|
2733
2720
|
...childSchema.forbiddenElements || []
|
|
2734
2721
|
];
|
|
2735
2722
|
const forbiddenChild = forbiddenScope.find(
|
|
2736
|
-
(
|
|
2723
|
+
(element2) => element2.code === childSchema.code
|
|
2737
2724
|
);
|
|
2738
2725
|
if (forbiddenChild) {
|
|
2739
2726
|
addValidationIssue(errors, {
|
|
@@ -2745,6 +2732,19 @@ var validateChildren = (element, schema, inheritedForbiddenScope) => {
|
|
|
2745
2732
|
});
|
|
2746
2733
|
continue;
|
|
2747
2734
|
}
|
|
2735
|
+
const allowedChild = allowedChildren.find(
|
|
2736
|
+
(candidate) => candidate.tagName === childTag
|
|
2737
|
+
);
|
|
2738
|
+
if (!allowedChild) {
|
|
2739
|
+
addValidationIssue(errors, {
|
|
2740
|
+
store: getStore(child),
|
|
2741
|
+
title: `Forbidden child element ${child.tagName}`,
|
|
2742
|
+
level: "warning",
|
|
2743
|
+
kind: "forbidden",
|
|
2744
|
+
description: `The child element ${child.tagName} is not allowed in this context.`
|
|
2745
|
+
});
|
|
2746
|
+
continue;
|
|
2747
|
+
}
|
|
2748
2748
|
errors.push(
|
|
2749
2749
|
...validateElementAgainstSchema(
|
|
2750
2750
|
child,
|
package/dist/index.mjs
CHANGED
|
@@ -2640,19 +2640,6 @@ var validateChildren = (element, schema, inheritedForbiddenScope) => {
|
|
|
2640
2640
|
}
|
|
2641
2641
|
for (const child of childElements) {
|
|
2642
2642
|
const childTag = child.tagName.toUpperCase();
|
|
2643
|
-
const allowedChild = allowedChildren.find(
|
|
2644
|
-
(candidate) => candidate.tagName === childTag
|
|
2645
|
-
);
|
|
2646
|
-
if (!allowedChild) {
|
|
2647
|
-
addValidationIssue(errors, {
|
|
2648
|
-
store: getStore(child),
|
|
2649
|
-
title: `Forbidden child element ${child.tagName}`,
|
|
2650
|
-
level: "warning",
|
|
2651
|
-
kind: "forbidden",
|
|
2652
|
-
description: `The child element ${child.tagName} is not allowed in this context.`
|
|
2653
|
-
});
|
|
2654
|
-
continue;
|
|
2655
|
-
}
|
|
2656
2643
|
const childSchema = findSchemaByElement(child);
|
|
2657
2644
|
if (!childSchema) {
|
|
2658
2645
|
addValidationIssue(errors, {
|
|
@@ -2669,7 +2656,7 @@ var validateChildren = (element, schema, inheritedForbiddenScope) => {
|
|
|
2669
2656
|
...childSchema.forbiddenElements || []
|
|
2670
2657
|
];
|
|
2671
2658
|
const forbiddenChild = forbiddenScope.find(
|
|
2672
|
-
(
|
|
2659
|
+
(element2) => element2.code === childSchema.code
|
|
2673
2660
|
);
|
|
2674
2661
|
if (forbiddenChild) {
|
|
2675
2662
|
addValidationIssue(errors, {
|
|
@@ -2681,6 +2668,19 @@ var validateChildren = (element, schema, inheritedForbiddenScope) => {
|
|
|
2681
2668
|
});
|
|
2682
2669
|
continue;
|
|
2683
2670
|
}
|
|
2671
|
+
const allowedChild = allowedChildren.find(
|
|
2672
|
+
(candidate) => candidate.tagName === childTag
|
|
2673
|
+
);
|
|
2674
|
+
if (!allowedChild) {
|
|
2675
|
+
addValidationIssue(errors, {
|
|
2676
|
+
store: getStore(child),
|
|
2677
|
+
title: `Forbidden child element ${child.tagName}`,
|
|
2678
|
+
level: "warning",
|
|
2679
|
+
kind: "forbidden",
|
|
2680
|
+
description: `The child element ${child.tagName} is not allowed in this context.`
|
|
2681
|
+
});
|
|
2682
|
+
continue;
|
|
2683
|
+
}
|
|
2684
2684
|
errors.push(
|
|
2685
2685
|
...validateElementAgainstSchema(
|
|
2686
2686
|
child,
|