Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion scripts/update-drafts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ function normalize(page: string) {
return String(url);
}

function formatIdentifier(s: string): string {
return s
.toLowerCase()
.split(/[^a-z0-9-]+/)
.join("-");
}

async function main() {
const compat = new Compat();

Expand Down Expand Up @@ -97,7 +104,7 @@ async function main() {
}

// Write out draft feature per spec.
const id = spec.shortname;
const id = formatIdentifier(spec.shortname);

const feature = new Document({
draft_date: new Date().toISOString().substring(0, 10),
Expand Down