Skip to content

Commit f2bca6a

Browse files
committed
Don't ignore _static and _event features that are in need of mdn pages
1 parent c888c33 commit f2bca6a

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.eleventy.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,19 @@ for (const feature of bcd.walk(["api", "css", "javascript", "html", "http", "svg
1818
// TODO(calculation fails for some features)
1919
}
2020

21-
// Ignore sub features
22-
// JavaScript is more nested so don't ignore there
23-
// Might need to redo this and ignore the trees less eagerly
24-
if (feature.id.split(".").length > 3 && !feature.id.startsWith("javascript") || feature.id.includes('_') ) {
21+
// Ignore sub features that are nested deeply
22+
// But don't do that for JavaScript as the tree is nested more deeply
23+
if (feature.id.split(".").length > 3 && !feature.id.startsWith("javascript")) {
2524
continue;
2625
}
2726

27+
// Ignore sub features that use "_"
28+
// But don't do that for _event, _static, _global_attributes
29+
// TODO this is still somewhat bad given it will ignore things that should be checked like interfaces in the WebGL space that contain "_"
30+
if (feature.id.includes('_') && !feature.id.includes('_event') && !feature.id.includes('_static') && !feature.id.includes('global_attributes')) {
31+
continue;
32+
}
33+
2834
// Ignore iterables for now
2935
// https://github.com/orgs/mdn/discussions/707
3036
const iterableInterfaces = [

0 commit comments

Comments
 (0)