Skip to content
Open
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions src/core/mdn-annotation.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check
import { fetchAndCache, getIntlData, showError } from "./utils.js";
import { docLink, fetchAndCache, getIntlData, showError } from "./utils.js";
import css from "../styles/mdn-annotation.css.js";
import { html } from "./import-maps.js";

Expand Down Expand Up @@ -177,7 +177,7 @@ async function getMdnData(key, mdnConf) {
const res = await fetchAndCache(url, maxAge);
if (res.status === 404) {
const msg = `Could not find MDN data associated with key "${key}".`;
const hint = "Please add a valid key to `respecConfig.mdn`";
const hint = docLink`If using \`mdn: true\`, check that ${"[shortName]"} is set correctly — the MDN key defaults to the spec's shortName. Otherwise, search for your spec's URL in the [MDN spec links map](https://github.com/w3c/mdn-spec-links/blob/main/SPECMAP.json) to find the correct key, then set ${"[mdn]"} to it.`;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can check mdn === true and provide a more specific message?

showError(msg, name, { hint });
return;
}
Expand Down
Loading