diff --git a/lib/l10n-en_GB.js b/lib/l10n-en_GB.js index 315db7e40..f24372c5c 100644 --- a/lib/l10n-en_GB.js +++ b/lib/l10n-en_GB.js @@ -21,7 +21,7 @@ export const messages = { 'headers.w3c-state.no-w3c-state-link': 'Cannot find the link of the W3C profile in id="w3c-state" element pointing to "https://www.w3.org/standards/types#xx".', 'headers.w3c-state.wrong-w3c-state-link': - 'The link for text "${text}" should pointing to W3C profile "${expectedLink}", but the link found in the document is "${linkFound}".', + 'The link for text "${text}" should pointing to W3C profile "https://www.w3.org/standards/types/#${hash}", but the link found in the document is "${linkFound}".', // headers/h2-toc 'headers.h2-toc.not-found': 'There is no table of contents inside a navigation element (<nav id="toc"> … <h2>Table of Contents</h2> … </nav>).', diff --git a/lib/rules.json b/lib/rules.json index 92fb0220b..a048cb8a0 100644 --- a/lib/rules.json +++ b/lib/rules.json @@ -1220,7 +1220,7 @@ ], "dateState": [ "Recommendation", - "

If this is a modified Recommendation that was modified in place or is a new edition, the document must include both the original publication date and the modification date. For example:

<p id=\"w3c-state\">W3C Recommendation 7 April 2004, edited in place 19 August2004</p>
" + "

If this is a modified Recommendation that was modified in place or is a new edition, the document must include both the original publication date and the modification date. For example:

<p id=\"w3c-state\">W3C Recommendation 7 April 2004, edited in place 19 August2004</p>
" ], "docIDFormat": true, "docIDOrder": "Document identifier information must be present in this order: ", @@ -1577,7 +1577,7 @@ "logo": "The document must include a link to the W3C logo identified below. The URI used to identify the logo must be absolute.
\"W3C\"
Include this source code:
<a href=\"https://www.w3.org/\"><img height=\"48\" width=\"72\" alt=\"W3C\" src=\"https://www.w3.org/StyleSheets/TR/2021/logos/W3C\"/></a>
", "title": "The document's title must be in the title element and in an h1 element. When calculating text equation, special transformations made to h1 are:
  1. Replace ':<br>' with ': '
  2. Replace '<br>' with ' - '
  3. Extract text from h1, and ignore HTML tags.
", "versionNumber": "Technical report version information, i.e., version and edition numbers.
    @{param1}
  1. See the (non-normative) Version Management in W3C Technical Reports for more information.
", - "dateState": "The document's status and date must be in a <p id=\"w3c-state\"> element as follows (see also date syntax):
<p id=\"w3c-state\">W3C @{param1} DD Month YYYY</p>
@{param2}", + "dateState": "The document's status and date must be in a <p id=\"w3c-state\"> element as follows (see also date syntax):
<p id=\"w3c-state\">W3C @{param1} DD Month YYYY</p>
@{param2}", "docIDFormat": "Document identifier information must be presented in a dl list, where each dt element marks up an identifier role (\"This Version\", \"Latest Version\", \"History\", etc.) and each dd element includes a link whose link text is the identifier. That dl must itself be placed in a details element.

Include this source code:
<details open><summary>More details about this document</summary><dl>...</dl></details>

", "docIDOrder": "Document identifier information must be present in this order: ", "docIDThisVersion": "The syntax of a “this version” URI must be https://www.w3.org/TR/YYYY/@{param1}-shortname-YYYYMMDD/. If the document introduces a new shortname, it must use lowercase letters.", diff --git a/lib/rules/headers/w3c-state.js b/lib/rules/headers/w3c-state.js index cc96d64ea..b3f52ab7c 100644 --- a/lib/rules/headers/w3c-state.js +++ b/lib/rules/headers/w3c-state.js @@ -55,12 +55,14 @@ export function check(sr, done) { if (sr.config.longStatus === 'First Public Working Draft') { hash = 'FPWD'; } - const expectedLink = `https://www.w3.org/standards/types#${hash}`; + const expectedLink = new RegExp( + `https://www.w3.org/standards/types/?#${hash}` + ); if (!standardLink) { sr.error(self, 'no-w3c-state-link'); - } else if (standardLink.href !== expectedLink) { + } else if (!expectedLink.test(standardLink.href)) { sr.error(self, 'wrong-w3c-state-link', { - expectedLink, + hash, linkFound: standardLink.href, text: sr.norm(standardLink.textContent), }); diff --git a/test/doc-views/layout/spec.handlebars b/test/doc-views/layout/spec.handlebars index aa67fc411..7d8887f2c 100644 --- a/test/doc-views/layout/spec.handlebars +++ b/test/doc-views/layout/spec.handlebars @@ -36,7 +36,7 @@ {{/if}}

- W3C {{config.longStatus}} {{config.crType}} {{config.cryType}} + W3C {{config.longStatus}} {{config.crType}} {{config.cryType}} {{! if document is Echidna, use current date. else, use default date}}

High Resolution Time

- W3C Candidate Recommendation Snapshot + W3C Candidate Recommendation Snapshot

diff --git a/test/docs/2021-crd.html b/test/docs/2021-crd.html index 61f1f162f..04ecab6fe 100644 --- a/test/docs/2021-crd.html +++ b/test/docs/2021-crd.html @@ -20,7 +20,7 @@

High Resolution Time

- W3C Candidate Recommendation Draft + W3C Candidate Recommendation Draft

diff --git a/test/docs/2021-cry.html b/test/docs/2021-cry.html index 1ee8e5c54..b3c89ac0f 100644 --- a/test/docs/2021-cry.html +++ b/test/docs/2021-cry.html @@ -616,7 +616,7 @@

Ready-made Counter Styles

- W3C Candidate Registry Snapshot + W3C Candidate Registry Snapshot

More details about this document diff --git a/test/docs/2021-cryd.html b/test/docs/2021-cryd.html index 344db254b..0f225d28c 100644 --- a/test/docs/2021-cryd.html +++ b/test/docs/2021-cryd.html @@ -616,7 +616,7 @@

Ready-made Counter Styles

- W3C Candidate Registry Draft + W3C Candidate Registry Draft

diff --git a/test/docs/2021-disc.html b/test/docs/2021-disc.html index e0ddbc513..1725a0d20 100644 --- a/test/docs/2021-disc.html +++ b/test/docs/2021-disc.html @@ -20,7 +20,7 @@

Foo Time

- W3C Discontinued Draft + W3C Discontinued Draft

diff --git a/test/docs/2021-dnote.html b/test/docs/2021-dnote.html index 31dc23da5..28ace956f 100644 --- a/test/docs/2021-dnote.html +++ b/test/docs/2021-dnote.html @@ -618,7 +618,7 @@

Ready-made Counter Styles

- W3C Group Draft Note + W3C Group Draft Note

diff --git a/test/docs/2021-dry.html b/test/docs/2021-dry.html index 722b4e325..196b90cc2 100644 --- a/test/docs/2021-dry.html +++ b/test/docs/2021-dry.html @@ -616,7 +616,7 @@

Ready-made Counter Styles

- W3C Draft Registry + W3C Draft Registry

diff --git a/test/docs/2021-fpwd.html b/test/docs/2021-fpwd.html index 1dd8484bd..f41c6b987 100644 --- a/test/docs/2021-fpwd.html +++ b/test/docs/2021-fpwd.html @@ -20,7 +20,7 @@

Foo Time

- W3C First Public Working Draft + W3C First Public Working Draft

diff --git a/test/docs/2021-note.html b/test/docs/2021-note.html index 3baa9e103..1c032cbfd 100644 --- a/test/docs/2021-note.html +++ b/test/docs/2021-note.html @@ -618,7 +618,7 @@

Ready-made Counter Styles

- W3C Group Note + W3C Group Note

diff --git a/test/docs/2021-pr.html b/test/docs/2021-pr.html index f3ead66c2..aa949c3ea 100644 --- a/test/docs/2021-pr.html +++ b/test/docs/2021-pr.html @@ -20,7 +20,7 @@

High Resolution Time

- W3C Proposed Recommendation + W3C Proposed Recommendation

diff --git a/test/docs/2021-rec.html b/test/docs/2021-rec.html index 5dea11312..16e63f1e3 100644 --- a/test/docs/2021-rec.html +++ b/test/docs/2021-rec.html @@ -17,7 +17,7 @@

CSS Color Module Level 3

-

W3C Recommendation +

W3C Recommendation

diff --git a/test/docs/2021-ry.html b/test/docs/2021-ry.html index 24dbfe4cf..56df2295a 100644 --- a/test/docs/2021-ry.html +++ b/test/docs/2021-ry.html @@ -616,7 +616,7 @@

Ready-made Counter Styles

- W3C Registry + W3C Registry

diff --git a/test/docs/2021-stmt.html b/test/docs/2021-stmt.html index 62c7ff8c7..fd8c84002 100644 --- a/test/docs/2021-stmt.html +++ b/test/docs/2021-stmt.html @@ -618,7 +618,7 @@

Ready-made Counter Styles

- W3C Statement + W3C Statement

diff --git a/test/docs/2021-wd-shortname-change.html b/test/docs/2021-wd-shortname-change.html index 4524f53dc..bc60ae003 100644 --- a/test/docs/2021-wd-shortname-change.html +++ b/test/docs/2021-wd-shortname-change.html @@ -20,7 +20,7 @@

Foo Time

- W3C Working Draft + W3C Working Draft

diff --git a/test/docs/2021-wd.html b/test/docs/2021-wd.html index 23ababcbf..7999d6547 100644 --- a/test/docs/2021-wd.html +++ b/test/docs/2021-wd.html @@ -20,7 +20,7 @@

Foo Time

- W3C Working Draft + W3C Working Draft