Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
fix(core/webidl): cite WEBIDL instead of WebIDL (speced#3811)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoscaceres authored Oct 7, 2021
1 parent 6a43937 commit ab47b20
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/webidl.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ const templates = {
// Shepherd classifies "interfaces" as starting with capital letters,
// like Promise, FrozenArray, etc.
return /^[A-Z]/.test(keyword)
? html`<a data-xref-type="interface" data-cite="WebIDL">${keyword}</a>`
? html`<a data-xref-type="interface" data-cite="WEBIDL">${keyword}</a>`
: // Other keywords like sequence, maplike, etc...
html`<a data-xref-type="dfn" data-cite="WebIDL">${keyword}</a>`;
html`<a data-xref-type="dfn" data-cite="WEBIDL">${keyword}</a>`;
},
reference(wrapped, unescaped, context) {
if (context.type === "extended-attribute" && context.name !== "Exposed") {
Expand Down Expand Up @@ -370,11 +370,11 @@ function renderWebIDL(idlElement, index) {
// cross reference
const closestCite = idlElement.closest("[data-cite], body");
const { dataset } = closestCite;
if (!dataset.cite) dataset.cite = "WebIDL";
if (!dataset.cite) dataset.cite = "WEBIDL";
// includes webidl in some form
if (!/\bwebidl\b/i.test(dataset.cite)) {
const cites = dataset.cite.trim().split(/\s+/);
dataset.cite = ["WebIDL", ...cites].join(" ");
dataset.cite = ["WEBIDL", ...cites].join(" ");
}
addIDLHeader(idlElement);
return parse;
Expand Down

0 comments on commit ab47b20

Please sign in to comment.