Skip to content

Commit d1381ce

Browse files
committed
$comment is not a statement
1 parent f4aced5 commit d1381ce

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/coverage-util.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ export const astToCoverageMap = (compiledSchema, schemaPath, schemaNodes) => {
6666
if (Array.isArray(keywordNode)) {
6767
const [keywordUri, keywordLocation] = keywordNode;
6868

69+
if (keywordUri === "https://json-schema.org/keyword/comment") {
70+
continue;
71+
}
72+
6973
const pointer = decodeURI(parseIri(keywordLocation).fragment ?? "");
7074
const node = getNodeFromPointer(schemaNodes[toAbsoluteIri(keywordLocation)], pointer, true);
7175
const range = positionToRange(node.position);
@@ -103,7 +107,6 @@ const positionToRange = (position) => {
103107
};
104108

105109
const annotationKeywords = new Set([
106-
"https://json-schema.org/keyword/comment",
107110
"https://json-schema.org/keyword/definitions",
108111
"https://json-schema.org/keyword/title",
109112
"https://json-schema.org/keyword/description",

0 commit comments

Comments
 (0)