Skip to content

Commit

Permalink
Fix heading ID casing
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Cena committed Aug 6, 2024
1 parent f4aed75 commit 88af226
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/server/create-graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,20 +122,20 @@ graph.forEachNode((node) => {
const linkTargets: string[] = [];
const ids: string[] = [];
for (const part of content) {
if (part.value.id) ids.push(part.value.id);
// TODO Yari does this case folding but it should just output lowercase IDs
// in the build output
if (part.value.id) ids.push(part.value.id.toLowerCase());
switch (part.type) {
case "specifications":
if (node.data.specifications) {
report(node, "Duplicate specifications");
}
node.data.specifications = part.value.specifications;
ids.push(part.value.id);
continue;
case "browser_compatibility":
// We use metadata.browserCompat
if (!node.data.metadata.browserCompat?.includes(part.value.query))
report(node, "Bad browser compat query", part.value.query);
ids.push(part.value.id);
continue;
case "prose":
break;
Expand Down

0 comments on commit 88af226

Please sign in to comment.