Skip to content

Commit

Permalink
Merge branch 'part15' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
RubenVerg committed Feb 18, 2025
2 parents fbfb1d9 + 89813cc commit 61c8b03
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ export function validatePages(): void {
const allGlyphs = [...Object.values(pages.glyphs).map(g => g.glyph).join('')];
const allGlyphPrimitives = Object.values(pages.glyphs).flatMap(p => p.primitives);
for (const [p, { glyph, name }] of Object.entries(pages.primitives)) {
for (const g of [...glyph])
for (const g of [...glyph]) {
if (!allGlyphs.includes(g)) throw new Error(`Primitive ${name} has glyph ${g} which is not in the glyphs`);
if (!Object.values(pages.glyphs).find(_ => _.glyph === g)!.primitives.includes(p)) throw new Error(`Primitive ${name} doesn't appear in the glyph page for ${g}`);
}
if (!allGlyphPrimitives.includes(p)) throw new Error(`Primitive ${name} is not in the glyphs`);
}
}
Expand Down

0 comments on commit 61c8b03

Please sign in to comment.