Skip to content

Commit

Permalink
Add IETF specs used in MDN
Browse files Browse the repository at this point in the history
close #280
  • Loading branch information
dontcallmedom committed Jul 1, 2021
1 parent d3101bc commit 358343c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
13 changes: 13 additions & 0 deletions specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@
}
},
"https://console.spec.whatwg.org/",
"https://datatracker.ietf.org/doc/html/rfc6265",
"https://datatracker.ietf.org/doc/html/rfc6454",
"https://datatracker.ietf.org/doc/html/rfc7230",
"https://datatracker.ietf.org/doc/html/rfc7231",
"https://datatracker.ietf.org/doc/html/rfc7232",
"https://datatracker.ietf.org/doc/html/rfc7233",
"https://datatracker.ietf.org/doc/html/rfc7234",
"https://datatracker.ietf.org/doc/html/rfc7235",
"https://datatracker.ietf.org/doc/html/rfc7239",
"https://datatracker.ietf.org/doc/html/rfc7469",
"https://datatracker.ietf.org/doc/html/rfc7538",
"https://datatracker.ietf.org/doc/html/rfc7540",
"https://datatracker.ietf.org/doc/html/rfc8470",
"https://dom.spec.whatwg.org/",
"https://drafts.css-houdini.org/css-typed-om-2/ delta",
"https://drafts.css-houdini.org/font-metrics-api-1/",
Expand Down
6 changes: 6 additions & 0 deletions src/compute-shortname.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ function computeShortname(url) {
return "svg-" + svg[1];
}

// Handle IETF RFCs
const rfcs = url.match(/\/datatracker\.ietf\.org\/doc\/html\/(rfc[0-9]+)/);
if (rfcs) {
return rfcs[1];
}

// Return name when one was given
if (!url.match(/\//)) {
return url;
Expand Down

0 comments on commit 358343c

Please sign in to comment.