Skip to content

Commit cd7458c

Browse files
OnkarRuikarcaugner
andauthored
fix(macros/CSSRef): include level two functions (#10679)
For example, https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/hsl was no longer shown in the sidebar, since it moved into `Web/CSS/color_value`. Co-authored-by: Claas Augner <[email protected]>
1 parent 0b6e2ae commit cd7458c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: kumascript/macros/CSSRef.ejs

+8-1
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,11 @@ const hasTag = page.hasTag;
941941
const rtlLocales = ['ar', 'he', 'fa'];
942942
943943
const pageList = await page.subpagesExpand('/en-US/docs/Web/CSS');
944+
945+
// Some functions are at depth two.
946+
// Example: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/hsl
947+
pageList.push(...pageList.map((page) => page.subpages).flat());
948+
944949
const standardPages = pageList.filter(page => !hasTag(page, "Non-standard"));
945950
946951
const groups = [];
@@ -986,7 +991,9 @@ for (const page of standardPages) {
986991
}
987992
}
988993
989-
properties = properties.sort((a, b) => a.title.localeCompare(b.title));
994+
const sortByTitle = (a, b) => a.title.localeCompare(b.title);
995+
properties.sort(sortByTitle);
996+
functions.sort(sortByTitle);
990997
991998
function smartLink(href, title, content, subpath) {
992999
let basepath = subpath;

0 commit comments

Comments
 (0)