Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(macros/CSSRef): include level two functions #10679

Merged
merged 6 commits into from
Apr 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion kumascript/macros/CSSRef.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,11 @@ const hasTag = page.hasTag;
const rtlLocales = ['ar', 'he', 'fa'];

const pageList = await page.subpagesExpand('/en-US/docs/Web/CSS');

// Some functions are at depth two.
// Example: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/hsl
pageList.push(...pageList.map((page) => page.subpages).flat());

const standardPages = pageList.filter(page => !hasTag(page, "Non-standard"));

const groups = [];
Expand Down Expand Up @@ -986,7 +991,9 @@ for (const page of standardPages) {
}
}

properties = properties.sort((a, b) => a.title.localeCompare(b.title));
const sortByTitle = (a, b) => a.title.localeCompare(b.title);
properties.sort(sortByTitle);
functions.sort(sortByTitle);

function smartLink(href, title, content, subpath) {
let basepath = subpath;
Expand Down