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

Don't fetch info from Specref for CSS and www.w3.org specs. #1658

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,7 @@
"url": "https://www.w3.org/Graphics/GIF/spec-gif89a.txt",
"shortname": "GIF",
"shortTitle": "GIF",
"title": "Graphics Interchange Format",
"organization": "CompuServe Incorporated",
"groups": [
{
Expand Down
13 changes: 12 additions & 1 deletion src/fetch-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ async function fetchInfoFromSpecref(specs, options) {
// these specs to avoid a catch-22 where the info in browser-specs gets stuck
// to the that in Specref.
const filteredSpecs = specs.filter(spec =>
!spec.url.match(/\/\/(wicg|w3c)\.github\.io\//));
!spec.url.match(/\/\/(wicg|w3c)\.github\.io\//) &&
!spec.url.match(/\/\/www\.w3\.org\//) &&
!spec.url.match(/\/\/drafts\.csswg\.org\//));

const chunks = chunkArray(filteredSpecs, 50);
const chunksRes = await Promise.all(chunks.map(async chunk => {
Expand Down Expand Up @@ -505,6 +507,15 @@ async function fetchInfoFromSpecs(specs, options) {
};
}
}
else if (spec.url.endsWith(".txt")) {
// Spec from another time (typically the GIF spec), published as plain
// text. Nothing we can usefully extract from the spec. Let's proceed
// and hope `specs.json` contains the appropriate info for the spec
// (no official status for the spec either, using "Editor's Draft")
return {
nightly: { url, status: "Editor's Draft" }
}
}

const titleAndStatus = await page.evaluate(_ => {
// Extract first heading when set
Expand Down
Loading