html-validate 7.7.1 → 7.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/cjs/browser.d.ts +4 -2
  2. package/dist/cjs/browser.js +12 -7
  3. package/dist/cjs/browser.js.map +1 -1
  4. package/dist/cjs/cli.js +2 -0
  5. package/dist/cjs/cli.js.map +1 -1
  6. package/dist/cjs/core.d.ts +33 -67
  7. package/dist/cjs/core.js +410 -2452
  8. package/dist/cjs/core.js.map +1 -1
  9. package/dist/cjs/elements.js +4213 -0
  10. package/dist/cjs/elements.js.map +1 -0
  11. package/dist/cjs/html-validate.js +3 -0
  12. package/dist/cjs/html-validate.js.map +1 -1
  13. package/dist/cjs/index.d.ts +5 -3
  14. package/dist/cjs/index.js +12 -7
  15. package/dist/cjs/index.js.map +1 -1
  16. package/dist/cjs/jest-lib.js +1 -0
  17. package/dist/cjs/jest-lib.js.map +1 -1
  18. package/dist/cjs/jest.d.ts +1 -1
  19. package/dist/cjs/jest.js +3 -0
  20. package/dist/cjs/jest.js.map +1 -1
  21. package/dist/cjs/meta-helper.d.ts +27 -0
  22. package/dist/cjs/meta-helper.js +64 -0
  23. package/dist/cjs/meta-helper.js.map +1 -0
  24. package/dist/cjs/rules-helper.d.ts +45 -0
  25. package/dist/cjs/rules-helper.js +408 -0
  26. package/dist/cjs/rules-helper.js.map +1 -0
  27. package/dist/cjs/test-utils.d.ts +1 -1
  28. package/dist/es/browser.d.ts +4 -2
  29. package/dist/es/browser.js +4 -2
  30. package/dist/es/browser.js.map +1 -1
  31. package/dist/es/cli.js +3 -1
  32. package/dist/es/cli.js.map +1 -1
  33. package/dist/es/core.d.ts +33 -67
  34. package/dist/es/core.js +377 -2422
  35. package/dist/es/core.js.map +1 -1
  36. package/dist/es/elements.js +4210 -0
  37. package/dist/es/elements.js.map +1 -0
  38. package/dist/es/html-validate.js +4 -2
  39. package/dist/es/html-validate.js.map +1 -1
  40. package/dist/es/index.d.ts +5 -3
  41. package/dist/es/index.js +4 -2
  42. package/dist/es/index.js.map +1 -1
  43. package/dist/es/jest-lib.js +2 -1
  44. package/dist/es/jest-lib.js.map +1 -1
  45. package/dist/es/jest.d.ts +1 -1
  46. package/dist/es/jest.js +3 -1
  47. package/dist/es/jest.js.map +1 -1
  48. package/dist/es/meta-helper.d.ts +27 -0
  49. package/dist/es/meta-helper.js +61 -0
  50. package/dist/es/meta-helper.js.map +1 -0
  51. package/dist/es/rules-helper.d.ts +45 -0
  52. package/dist/es/rules-helper.js +398 -0
  53. package/dist/es/rules-helper.js.map +1 -0
  54. package/dist/es/test-utils.d.ts +1 -1
  55. package/elements/html5.js +1 -2119
  56. package/package.json +14 -13
  57. package/elements/README.md +0 -49
  58. package/elements/entities.json +0 -1724
package/dist/es/core.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import fs from 'fs';
2
2
  import betterAjvErrors from '@sidvind/better-ajv-errors';
3
+ import { C as CaseStyle, n as naturalJoin, c as classifyNodeText, T as TextClassification, h as hasAltText, i as isHTMLHidden, a as isAriaHidden, b as hasAccessibleName, d as inAccessibilityTree, e as hasAriaLabel } from './rules-helper.js';
3
4
  import Ajv from 'ajv';
4
5
  import deepmerge from 'deepmerge';
5
6
  import * as espree from 'espree';
@@ -7,7 +8,7 @@ import * as walk from 'acorn-walk';
7
8
  import path from 'path';
8
9
  import semver from 'semver';
9
10
  import kleur from 'kleur';
10
- import { fileURLToPath } from 'node:url';
11
+ import { e as entities$1, b as bundledElements } from './elements.js';
11
12
  import { createRequire } from 'module';
12
13
  import { codeFrameColumns } from '@babel/code-frame';
13
14
  import stylishImpl from '@html-validate/stylish';
@@ -243,104 +244,6 @@ var ajvSchemaDraft = {
243
244
  }
244
245
  };
245
246
 
246
- function stringify(value) {
247
- if (typeof value === "string") {
248
- return String(value);
249
- }
250
- else {
251
- return JSON.stringify(value);
252
- }
253
- }
254
- /**
255
- * Represents an `Error` created from arbitrary values.
256
- *
257
- * @public
258
- */
259
- class WrappedError extends Error {
260
- constructor(message) {
261
- super(stringify(message));
262
- }
263
- }
264
-
265
- /**
266
- * Ensures the value is an Error.
267
- *
268
- * If the passed value is not an `Error` instance a [[WrappedError]] is
269
- * constructed with the stringified value.
270
- *
271
- * @internal
272
- */
273
- function ensureError(value) {
274
- if (value instanceof Error) {
275
- return value;
276
- }
277
- else {
278
- return new WrappedError(value);
279
- }
280
- }
281
-
282
- class NestedError extends Error {
283
- constructor(message, nested) {
284
- super(message);
285
- Error.captureStackTrace(this, NestedError);
286
- if (nested && nested.stack) {
287
- this.stack += `\nCaused by: ${nested.stack}`;
288
- }
289
- }
290
- }
291
-
292
- /**
293
- * @public
294
- */
295
- class UserError extends NestedError {
296
- }
297
-
298
- function getSummary(schema, obj, errors) {
299
- const output = betterAjvErrors(schema, obj, errors, {
300
- format: "js",
301
- });
302
- // istanbul ignore next: for safety only
303
- return output.length > 0 ? output[0].error : "unknown validation error";
304
- }
305
- /**
306
- * @public
307
- */
308
- class SchemaValidationError extends UserError {
309
- constructor(filename, message, obj, schema, errors) {
310
- const summary = getSummary(schema, obj, errors);
311
- super(`${message}: ${summary}`);
312
- this.filename = filename;
313
- this.obj = obj;
314
- this.schema = schema;
315
- this.errors = errors;
316
- }
317
- prettyError() {
318
- const json = this.getRawJSON();
319
- return betterAjvErrors(this.schema, this.obj, this.errors, {
320
- format: "cli",
321
- indent: 2,
322
- json,
323
- });
324
- }
325
- getRawJSON() {
326
- if (this.filename && fs.existsSync(this.filename)) {
327
- return fs.readFileSync(this.filename, "utf-8");
328
- }
329
- else {
330
- return null;
331
- }
332
- }
333
- }
334
-
335
- /**
336
- * Helper function to assist IDE with completion and type-checking.
337
- *
338
- * @public
339
- */
340
- function defineMetadata(metatable) {
341
- return metatable;
342
- }
343
-
344
247
  /**
345
248
  * @public
346
249
  */
@@ -1697,273 +1600,94 @@ class DOMTree {
1697
1600
  }
1698
1601
  }
1699
1602
 
1700
- const ARIA_HIDDEN_CACHE = Symbol(isAriaHidden.name);
1701
- const HTML_HIDDEN_CACHE = Symbol(isHTMLHidden.name);
1702
- const ROLE_PRESENTATION_CACHE = Symbol(isPresentation.name);
1703
- /**
1704
- * Tests if this element is present in the accessibility tree.
1705
- *
1706
- * In practice it tests whenever the element or its parents has
1707
- * `role="presentation"` or `aria-hidden="false"`. Dynamic values counts as
1708
- * visible since the element might be in the visibility tree sometimes.
1709
- */
1710
- function inAccessibilityTree(node) {
1711
- return !isAriaHidden(node) && !isPresentation(node);
1712
- }
1713
- function isAriaHiddenImpl(node) {
1714
- const isHidden = (node) => {
1715
- const ariaHidden = node.getAttribute("aria-hidden");
1716
- return Boolean(ariaHidden && ariaHidden.value === "true");
1717
- };
1718
- return {
1719
- byParent: node.parent ? isAriaHidden(node.parent) : false,
1720
- bySelf: isHidden(node),
1721
- };
1722
- }
1723
- function isAriaHidden(node, details) {
1724
- const cached = node.cacheGet(ARIA_HIDDEN_CACHE);
1725
- if (cached) {
1726
- return details ? cached : cached.byParent || cached.bySelf;
1603
+ function stringify(value) {
1604
+ if (typeof value === "string") {
1605
+ return String(value);
1727
1606
  }
1728
- const result = node.cacheSet(ARIA_HIDDEN_CACHE, isAriaHiddenImpl(node));
1729
- return details ? result : result.byParent || result.bySelf;
1730
- }
1731
- function isHTMLHiddenImpl(node) {
1732
- const isHidden = (node) => {
1733
- const hidden = node.getAttribute("hidden");
1734
- return hidden !== null && hidden.isStatic;
1735
- };
1736
- return {
1737
- byParent: node.parent ? isHTMLHidden(node.parent) : false,
1738
- bySelf: isHidden(node),
1739
- };
1740
- }
1741
- function isHTMLHidden(node, details) {
1742
- const cached = node.cacheGet(HTML_HIDDEN_CACHE);
1743
- if (cached) {
1744
- return details ? cached : cached.byParent || cached.bySelf;
1607
+ else {
1608
+ return JSON.stringify(value);
1745
1609
  }
1746
- const result = node.cacheSet(HTML_HIDDEN_CACHE, isHTMLHiddenImpl(node));
1747
- return details ? result : result.byParent || result.bySelf;
1748
1610
  }
1749
1611
  /**
1750
- * Tests if this element or a parent element has role="presentation".
1612
+ * Represents an `Error` created from arbitrary values.
1751
1613
  *
1752
- * Dynamic values yields `false` just as if the attribute wasn't present.
1753
- */
1754
- function isPresentation(node) {
1755
- if (node.cacheExists(ROLE_PRESENTATION_CACHE)) {
1756
- return Boolean(node.cacheGet(ROLE_PRESENTATION_CACHE));
1757
- }
1758
- let cur = node;
1759
- do {
1760
- const role = cur.getAttribute("role");
1761
- /* role="presentation" */
1762
- if (role && role.value === "presentation") {
1763
- return cur.cacheSet(ROLE_PRESENTATION_CACHE, true);
1764
- }
1765
- /* sanity check: break if no parent is present, normally not an issue as the
1766
- * root element should be found first */
1767
- if (!cur.parent) {
1768
- break;
1769
- }
1770
- /* check parents */
1771
- cur = cur.parent;
1772
- } while (!cur.isRootElement());
1773
- return node.cacheSet(ROLE_PRESENTATION_CACHE, false);
1774
- }
1775
-
1776
- const cachePrefix = classifyNodeText.name;
1777
- const HTML_CACHE_KEY = Symbol(`${cachePrefix}|html`);
1778
- const A11Y_CACHE_KEY = Symbol(`${cachePrefix}|a11y`);
1779
- const IGNORE_HIDDEN_ROOT_HTML_CACHE_KEY = Symbol(`${cachePrefix}|html|ignore-hidden-root`);
1780
- const IGNORE_HIDDEN_ROOT_A11Y_CACHE_KEY = Symbol(`${cachePrefix}|a11y|ignore-hidden-root`);
1781
- /**
1782
1614
  * @public
1783
1615
  */
1784
- var TextClassification;
1785
- (function (TextClassification) {
1786
- TextClassification[TextClassification["EMPTY_TEXT"] = 0] = "EMPTY_TEXT";
1787
- TextClassification[TextClassification["DYNAMIC_TEXT"] = 1] = "DYNAMIC_TEXT";
1788
- TextClassification[TextClassification["STATIC_TEXT"] = 2] = "STATIC_TEXT";
1789
- })(TextClassification || (TextClassification = {}));
1790
- function getCachekey(options = {}) {
1791
- const { accessible = false, ignoreHiddenRoot = false } = options;
1792
- if (accessible && ignoreHiddenRoot) {
1793
- return IGNORE_HIDDEN_ROOT_A11Y_CACHE_KEY;
1794
- }
1795
- else if (ignoreHiddenRoot) {
1796
- return IGNORE_HIDDEN_ROOT_HTML_CACHE_KEY;
1797
- }
1798
- else if (accessible) {
1799
- return A11Y_CACHE_KEY;
1800
- }
1801
- else {
1802
- return HTML_CACHE_KEY;
1616
+ class WrappedError extends Error {
1617
+ constructor(message) {
1618
+ super(stringify(message));
1803
1619
  }
1804
1620
  }
1805
- /* While I cannot find a reference about this in the standard the <select>
1806
- * element kinda acts as if there is no text content, most particularly it
1807
- * doesn't receive and accessible name. The `.textContent` property does
1808
- * however include the <option> childrens text. But for the sake of the
1809
- * validator it is probably best if the classification acts as if there is no
1810
- * text as I think that is what is expected of the return values. Might have
1811
- * to revisit this at some point or if someone could clarify what section of
1812
- * the standard deals with this. */
1813
- function isSpecialEmpty(node) {
1814
- return node.is("select") || node.is("textarea");
1815
- }
1621
+
1816
1622
  /**
1817
- * Checks text content of an element.
1818
- *
1819
- * Any text is considered including text from descendant elements. Whitespace is
1820
- * ignored.
1623
+ * Ensures the value is an Error.
1821
1624
  *
1822
- * If any text is dynamic `TextClassification.DYNAMIC_TEXT` is returned.
1625
+ * If the passed value is not an `Error` instance a [[WrappedError]] is
1626
+ * constructed with the stringified value.
1823
1627
  *
1824
- * @public
1628
+ * @internal
1825
1629
  */
1826
- function classifyNodeText(node, options = {}) {
1827
- const { accessible = false, ignoreHiddenRoot = false } = options;
1828
- const cacheKey = getCachekey(options);
1829
- if (node.cacheExists(cacheKey)) {
1830
- return node.cacheGet(cacheKey);
1831
- }
1832
- if (!ignoreHiddenRoot && isHTMLHidden(node)) {
1833
- return node.cacheSet(cacheKey, TextClassification.EMPTY_TEXT);
1834
- }
1835
- if (!ignoreHiddenRoot && accessible && isAriaHidden(node)) {
1836
- return node.cacheSet(cacheKey, TextClassification.EMPTY_TEXT);
1837
- }
1838
- if (isSpecialEmpty(node)) {
1839
- return node.cacheSet(cacheKey, TextClassification.EMPTY_TEXT);
1840
- }
1841
- const text = findTextNodes(node, {
1842
- ...options,
1843
- ignoreHiddenRoot: false,
1844
- });
1845
- /* if any text is dynamic classify as dynamic */
1846
- if (text.some((cur) => cur.isDynamic)) {
1847
- return node.cacheSet(cacheKey, TextClassification.DYNAMIC_TEXT);
1848
- }
1849
- /* if any text has non-whitespace character classify as static */
1850
- if (text.some((cur) => cur.textContent.match(/\S/) !== null)) {
1851
- return node.cacheSet(cacheKey, TextClassification.STATIC_TEXT);
1852
- }
1853
- /* default to empty */
1854
- return node.cacheSet(cacheKey, TextClassification.EMPTY_TEXT);
1855
- }
1856
- function findTextNodes(node, options) {
1857
- const { accessible = false } = options;
1858
- let text = [];
1859
- for (const child of node.childNodes) {
1860
- if (isTextNode(child)) {
1861
- text.push(child);
1862
- }
1863
- else if (isElementNode(child)) {
1864
- if (isHTMLHidden(child, true).bySelf) {
1865
- continue;
1866
- }
1867
- if (accessible && isAriaHidden(child, true).bySelf) {
1868
- continue;
1869
- }
1870
- text = text.concat(findTextNodes(child, options));
1871
- }
1630
+ function ensureError(value) {
1631
+ if (value instanceof Error) {
1632
+ return value;
1872
1633
  }
1873
- return text;
1874
- }
1875
-
1876
- function hasAltText(image) {
1877
- const alt = image.getAttribute("alt");
1878
- /* missing or boolean */
1879
- if (alt === null || alt.value === null) {
1880
- return false;
1634
+ else {
1635
+ return new WrappedError(value);
1881
1636
  }
1882
- return alt.isDynamic || alt.value.toString() !== "";
1883
1637
  }
1884
1638
 
1885
- function hasAriaLabel(node) {
1886
- const label = node.getAttribute("aria-label");
1887
- /* missing or boolean */
1888
- if (label === null || label.value === null) {
1889
- return false;
1639
+ class NestedError extends Error {
1640
+ constructor(message, nested) {
1641
+ super(message);
1642
+ Error.captureStackTrace(this, NestedError);
1643
+ if (nested && nested.stack) {
1644
+ this.stack += `\nCaused by: ${nested.stack}`;
1645
+ }
1890
1646
  }
1891
- return label.isDynamic || label.value.toString() !== "";
1892
1647
  }
1893
1648
 
1894
1649
  /**
1895
- * Joins a list of words into natural language.
1896
- *
1897
- * - `["foo"]` becomes `"foo"`
1898
- * - `["foo", "bar"]` becomes `"foo or bar"`
1899
- * - `["foo", "bar", "baz"]` becomes `"foo, bar or baz"`
1900
- * - and so on...
1901
- *
1902
- * @internal
1903
- * @param values - List of words to join
1904
- * @param conjunction - Conjunction for the last element.
1905
- * @returns String with the words naturally joined with a conjunction.
1650
+ * @public
1906
1651
  */
1907
- function naturalJoin(values, conjunction = "or") {
1908
- switch (values.length) {
1909
- case 0:
1910
- return "";
1911
- case 1:
1912
- return values[0];
1913
- case 2:
1914
- return `${values[0]} ${conjunction} ${values[1]}`;
1915
- default:
1916
- return `${values.slice(0, -1).join(", ")} ${conjunction} ${values.slice(-1)[0]}`;
1917
- }
1652
+ class UserError extends NestedError {
1918
1653
  }
1919
1654
 
1920
- /**
1921
- * @internal
1922
- */
1923
- function allowedIfAttributeIsPresent(...attr) {
1924
- return (node) => {
1925
- if (attr.some((it) => node.hasAttribute(it))) {
1926
- return null;
1927
- }
1928
- const expected = naturalJoin(attr.map((it) => `"${it}"`));
1929
- return `requires ${expected} attribute to be present`;
1930
- };
1931
- }
1932
- /**
1933
- * @internal
1934
- */
1935
- function allowedIfAttributeIsAbsent(...attr) {
1936
- return (node) => {
1937
- const present = attr.filter((it) => node.hasAttribute(it));
1938
- if (present.length === 0) {
1939
- return null;
1940
- }
1941
- const expected = naturalJoin(present.map((it) => `"${it}"`));
1942
- return `cannot be used at the same time as ${expected}`;
1943
- };
1655
+ function getSummary(schema, obj, errors) {
1656
+ const output = betterAjvErrors(schema, obj, errors, {
1657
+ format: "js",
1658
+ });
1659
+ // istanbul ignore next: for safety only
1660
+ return output.length > 0 ? output[0].error : "unknown validation error";
1944
1661
  }
1945
1662
  /**
1946
- * @internal
1663
+ * @public
1947
1664
  */
1948
- function allowedIfAttributeHasValue(key, expectedValue, { defaultValue } = {}) {
1949
- return (node) => {
1950
- const attr = node.getAttribute(key);
1951
- if (attr === null || attr === void 0 ? void 0 : attr.isDynamic) {
1952
- return null;
1665
+ class SchemaValidationError extends UserError {
1666
+ constructor(filename, message, obj, schema, errors) {
1667
+ const summary = getSummary(schema, obj, errors);
1668
+ super(`${message}: ${summary}`);
1669
+ this.filename = filename;
1670
+ this.obj = obj;
1671
+ this.schema = schema;
1672
+ this.errors = errors;
1673
+ }
1674
+ prettyError() {
1675
+ const json = this.getRawJSON();
1676
+ return betterAjvErrors(this.schema, this.obj, this.errors, {
1677
+ format: "cli",
1678
+ indent: 2,
1679
+ json,
1680
+ });
1681
+ }
1682
+ getRawJSON() {
1683
+ if (this.filename && fs.existsSync(this.filename)) {
1684
+ return fs.readFileSync(this.filename, "utf-8");
1953
1685
  }
1954
- const actualValue = (attr === null || attr === void 0 ? void 0 : attr.value) ? attr.value.toString() : defaultValue;
1955
- if (actualValue && expectedValue.includes(actualValue.toLocaleLowerCase())) {
1686
+ else {
1956
1687
  return null;
1957
1688
  }
1958
- const expected = naturalJoin(expectedValue.map((it) => `"${it}"`));
1959
- return `"${key}" attribute must be ${expected}`;
1960
- };
1689
+ }
1961
1690
  }
1962
- const metadataHelper = {
1963
- allowedIfAttributeIsPresent,
1964
- allowedIfAttributeIsAbsent,
1965
- allowedIfAttributeHasValue,
1966
- };
1967
1691
 
1968
1692
  /**
1969
1693
  * Computes hash for given string.
@@ -1991,9 +1715,7 @@ function cyrb53(str) {
1991
1715
  }
1992
1716
  const computeHash = cyrb53;
1993
1717
 
1994
- const projectRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../../");
1995
- const legacyRequire = createRequire(import.meta.url);
1996
- const distFolder = path.resolve(projectRoot, "dist/es");
1718
+ const legacyRequire = createRequire(import.meta.url);
1997
1719
 
1998
1720
  /**
1999
1721
  * Similar to `require(..)` but removes the cached copy first.
@@ -3502,16 +3224,6 @@ var TRANSFORMER_API;
3502
3224
  TRANSFORMER_API[TRANSFORMER_API["VERSION"] = 1] = "VERSION";
3503
3225
  })(TRANSFORMER_API || (TRANSFORMER_API = {}));
3504
3226
 
3505
- /* generated file, changes will be overwritten */
3506
- /** @public */
3507
- const name = "html-validate";
3508
- /** @public */
3509
- const version = "7.7.1";
3510
- /** @public */
3511
- const homepage = "https://html-validate.org";
3512
- /** @public */
3513
- const bugs = "https://gitlab.com/html-validate/html-validate/issues/new";
3514
-
3515
3227
  /**
3516
3228
  * @public
3517
3229
  */
@@ -3820,22 +3532,8 @@ class Rule {
3820
3532
  return null;
3821
3533
  }
3822
3534
  }
3823
- /**
3824
- * @internal
3825
- */
3826
- function ruleDocumentationUrl(filename) {
3827
- /* during bundling all "@/rule.ts"'s are converted to paths relative to the src
3828
- * folder and with the @/ prefix, by replacing the @ with the dist folder we
3829
- * can resolve the path properly */
3830
- filename = filename.replace("@", distFolder);
3831
- const p = path.parse(filename);
3832
- const root = path.join(distFolder, "rules");
3833
- const rel = path.relative(root, path.join(p.dir, p.name));
3834
- const normalized = rel.replace(/\\/g, "/");
3835
- return `${homepage}/rules/${normalized}.html`;
3836
- }
3837
3535
 
3838
- const defaults$t = {
3536
+ const defaults$u = {
3839
3537
  allowExternal: true,
3840
3538
  allowRelative: true,
3841
3539
  allowAbsolute: true,
@@ -3879,7 +3577,7 @@ function matchList(value, list) {
3879
3577
  }
3880
3578
  class AllowedLinks extends Rule {
3881
3579
  constructor(options) {
3882
- super({ ...defaults$t, ...options });
3580
+ super({ ...defaults$u, ...options });
3883
3581
  this.allowExternal = parseAllow(this.options.allowExternal);
3884
3582
  this.allowRelative = parseAllow(this.options.allowRelative);
3885
3583
  this.allowAbsolute = parseAllow(this.options.allowAbsolute);
@@ -3914,7 +3612,7 @@ class AllowedLinks extends Rule {
3914
3612
  const message = description[context] || "This link type is not allowed by current configuration";
3915
3613
  return {
3916
3614
  description: message,
3917
- url: ruleDocumentationUrl("@/rules/allowed-links.ts"),
3615
+ url: "https://html-validate.org/rules/allowed-links.html",
3918
3616
  };
3919
3617
  }
3920
3618
  setup() {
@@ -4027,7 +3725,7 @@ var RuleContext$1;
4027
3725
  RuleContext["MISSING_ALT"] = "missing-alt";
4028
3726
  RuleContext["MISSING_HREF"] = "missing-href";
4029
3727
  })(RuleContext$1 || (RuleContext$1 = {}));
4030
- const defaults$s = {
3728
+ const defaults$t = {
4031
3729
  accessible: true,
4032
3730
  };
4033
3731
  function findByTarget(target, siblings) {
@@ -4036,7 +3734,7 @@ function findByTarget(target, siblings) {
4036
3734
  function getAltText(node) {
4037
3735
  return node.getAttributeValue("alt");
4038
3736
  }
4039
- function getDescription(context) {
3737
+ function getDescription$1(context) {
4040
3738
  switch (context) {
4041
3739
  case RuleContext$1.MISSING_ALT:
4042
3740
  return [
@@ -4065,7 +3763,7 @@ function getDescription(context) {
4065
3763
  }
4066
3764
  class AreaAlt extends Rule {
4067
3765
  constructor(options) {
4068
- super({ ...defaults$s, ...options });
3766
+ super({ ...defaults$t, ...options });
4069
3767
  }
4070
3768
  static schema() {
4071
3769
  return {
@@ -4076,8 +3774,8 @@ class AreaAlt extends Rule {
4076
3774
  }
4077
3775
  documentation(context) {
4078
3776
  return {
4079
- description: getDescription(context).join("\n"),
4080
- url: ruleDocumentationUrl("@/rules/area-alt.ts"),
3777
+ description: getDescription$1(context).join("\n"),
3778
+ url: "https://html-validate.org/rules/area-alt.html",
4081
3779
  };
4082
3780
  }
4083
3781
  setup() {
@@ -4129,7 +3827,7 @@ class AriaHiddenBody extends Rule {
4129
3827
  documentation() {
4130
3828
  return {
4131
3829
  description: "`aria-hidden` must not be used on the `<body>` element as it makes the page inaccessible to assistive technology such as screenreaders",
4132
- url: ruleDocumentationUrl("@/rules/aria-hidden-body.ts"),
3830
+ url: "https://html-validate.org/rules/aria-hidden-body.html",
4133
3831
  };
4134
3832
  }
4135
3833
  setup() {
@@ -4182,7 +3880,7 @@ class AriaLabelMisuse extends Rule {
4182
3880
  const lines = valid.map((it) => `- ${it}\n`).join("");
4183
3881
  return {
4184
3882
  description: `\`aria-label\` can only be used on:\n\n${lines}`,
4185
- url: ruleDocumentationUrl("@/rules/aria-label-misuse.ts"),
3883
+ url: "https://html-validate.org/rules/aria-label-misuse.html",
4186
3884
  };
4187
3885
  }
4188
3886
  setup() {
@@ -4229,67 +3927,13 @@ class AriaLabelMisuse extends Rule {
4229
3927
  class ConfigError extends UserError {
4230
3928
  }
4231
3929
 
4232
- /**
4233
- * Represents casing for a name, e.g. lowercase, uppercase, etc.
4234
- */
4235
- class CaseStyle {
4236
- /**
4237
- * @param style - Name of a valid case style.
4238
- */
4239
- constructor(style, ruleId) {
4240
- if (!Array.isArray(style)) {
4241
- style = [style];
4242
- }
4243
- if (style.length === 0) {
4244
- throw new ConfigError(`Missing style for ${ruleId} rule`);
4245
- }
4246
- this.styles = this.parseStyle(style, ruleId);
4247
- }
4248
- /**
4249
- * Test if a text matches this case style.
4250
- */
4251
- match(text) {
4252
- return this.styles.some((style) => text.match(style.pattern));
4253
- }
4254
- get name() {
4255
- const names = this.styles.map((style) => style.name);
4256
- switch (this.styles.length) {
4257
- case 1:
4258
- return names[0];
4259
- case 2:
4260
- return names.join(" or ");
4261
- default: {
4262
- const last = names.slice(-1);
4263
- const rest = names.slice(0, -1);
4264
- return `${rest.join(", ")} or ${last[0]}`;
4265
- }
4266
- }
4267
- }
4268
- parseStyle(style, ruleId) {
4269
- return style.map((cur) => {
4270
- switch (cur.toLowerCase()) {
4271
- case "lowercase":
4272
- return { pattern: /^[a-z]*$/, name: "lowercase" };
4273
- case "uppercase":
4274
- return { pattern: /^[A-Z]*$/, name: "uppercase" };
4275
- case "pascalcase":
4276
- return { pattern: /^[A-Z][A-Za-z]*$/, name: "PascalCase" };
4277
- case "camelcase":
4278
- return { pattern: /^[a-z][A-Za-z]*$/, name: "camelCase" };
4279
- default:
4280
- throw new ConfigError(`Invalid style "${cur}" for ${ruleId} rule`);
4281
- }
4282
- });
4283
- }
4284
- }
4285
-
4286
- const defaults$r = {
3930
+ const defaults$s = {
4287
3931
  style: "lowercase",
4288
3932
  ignoreForeign: true,
4289
3933
  };
4290
3934
  class AttrCase extends Rule {
4291
3935
  constructor(options) {
4292
- super({ ...defaults$r, ...options });
3936
+ super({ ...defaults$s, ...options });
4293
3937
  this.style = new CaseStyle(this.options.style, "attr-case");
4294
3938
  }
4295
3939
  static schema() {
@@ -4321,7 +3965,7 @@ class AttrCase extends Rule {
4321
3965
  description: Array.isArray(style)
4322
3966
  ? [`Attribute name must be in one of:`, "", ...style.map((it) => `- ${it}`)].join("\n")
4323
3967
  : `Attribute name must be in ${style}.`,
4324
- url: ruleDocumentationUrl("@/rules/attr-case.ts"),
3968
+ url: "https://html-validate.org/rules/attr-case.html",
4325
3969
  };
4326
3970
  }
4327
3971
  setup() {
@@ -4614,7 +4258,7 @@ class AttrDelimiter extends Rule {
4614
4258
  documentation() {
4615
4259
  return {
4616
4260
  description: `Attribute value must not be separated by whitespace.`,
4617
- url: ruleDocumentationUrl("@/rules/attr-delimiter.ts"),
4261
+ url: "https://html-validate.org/rules/attr-delimiter.html",
4618
4262
  };
4619
4263
  }
4620
4264
  setup() {
@@ -4634,7 +4278,7 @@ class AttrDelimiter extends Rule {
4634
4278
  }
4635
4279
 
4636
4280
  const DEFAULT_PATTERN = "[a-z0-9-:]+";
4637
- const defaults$q = {
4281
+ const defaults$r = {
4638
4282
  pattern: DEFAULT_PATTERN,
4639
4283
  ignoreForeign: true,
4640
4284
  };
@@ -4671,7 +4315,7 @@ function generateDescription(name, pattern) {
4671
4315
  }
4672
4316
  class AttrPattern extends Rule {
4673
4317
  constructor(options) {
4674
- super({ ...defaults$q, ...options });
4318
+ super({ ...defaults$r, ...options });
4675
4319
  this.pattern = generateRegexp(this.options.pattern);
4676
4320
  }
4677
4321
  static schema() {
@@ -4694,7 +4338,7 @@ class AttrPattern extends Rule {
4694
4338
  }
4695
4339
  return {
4696
4340
  description,
4697
- url: ruleDocumentationUrl("@/rules/attr-pattern.ts"),
4341
+ url: "https://html-validate.org/rules/attr-pattern.html",
4698
4342
  };
4699
4343
  }
4700
4344
  setup() {
@@ -4732,7 +4376,7 @@ var QuoteStyle;
4732
4376
  QuoteStyle["AUTO_QUOTE"] = "auto";
4733
4377
  QuoteStyle["ANY_QUOTE"] = "any";
4734
4378
  })(QuoteStyle || (QuoteStyle = {}));
4735
- const defaults$p = {
4379
+ const defaults$q = {
4736
4380
  style: "auto",
4737
4381
  unquoted: false,
4738
4382
  };
@@ -4773,7 +4417,7 @@ function describeStyle(style, unquoted) {
4773
4417
  }
4774
4418
  class AttrQuotes extends Rule {
4775
4419
  constructor(options) {
4776
- super({ ...defaults$p, ...options });
4420
+ super({ ...defaults$q, ...options });
4777
4421
  this.style = parseStyle$4(this.options.style);
4778
4422
  }
4779
4423
  static schema() {
@@ -4799,7 +4443,7 @@ class AttrQuotes extends Rule {
4799
4443
  ];
4800
4444
  return {
4801
4445
  description: description.join("\n"),
4802
- url: ruleDocumentationUrl("@/rules/attr-quotes.ts"),
4446
+ url: "https://html-validate.org/rules/attr-quotes.html",
4803
4447
  };
4804
4448
  }
4805
4449
  setup() {
@@ -4867,7 +4511,7 @@ class AttrSpacing extends Rule {
4867
4511
  documentation() {
4868
4512
  return {
4869
4513
  description: `No space between attributes. At least one whitespace character (commonly space) must be used to separate attributes.`,
4870
- url: ruleDocumentationUrl("@/rules/attr-spacing.ts"),
4514
+ url: "https://html-validate.org/rules/attr-spacing.html",
4871
4515
  };
4872
4516
  }
4873
4517
  setup() {
@@ -4895,7 +4539,7 @@ class AttributeAllowedValues extends Rule {
4895
4539
  documentation(context) {
4896
4540
  const docs = {
4897
4541
  description: "Attribute has invalid value.",
4898
- url: ruleDocumentationUrl("@/rules/attribute-allowed-values.ts"),
4542
+ url: "https://html-validate.org/rules/attribute-allowed-values.html",
4899
4543
  };
4900
4544
  if (!context) {
4901
4545
  return docs;
@@ -4969,12 +4613,12 @@ class AttributeAllowedValues extends Rule {
4969
4613
  }
4970
4614
  }
4971
4615
 
4972
- const defaults$o = {
4616
+ const defaults$p = {
4973
4617
  style: "omit",
4974
4618
  };
4975
4619
  class AttributeBooleanStyle extends Rule {
4976
4620
  constructor(options) {
4977
- super({ ...defaults$o, ...options });
4621
+ super({ ...defaults$p, ...options });
4978
4622
  this.hasInvalidStyle = parseStyle$3(this.options.style);
4979
4623
  }
4980
4624
  static schema() {
@@ -4988,7 +4632,7 @@ class AttributeBooleanStyle extends Rule {
4988
4632
  documentation() {
4989
4633
  return {
4990
4634
  description: "Require a specific style when writing boolean attributes.",
4991
- url: ruleDocumentationUrl("@/rules/attribute-boolean-style.ts"),
4635
+ url: "https://html-validate.org/rules/attribute-boolean-style.html",
4992
4636
  };
4993
4637
  }
4994
4638
  setup() {
@@ -5050,12 +4694,12 @@ function reportMessage$1(attr, style) {
5050
4694
  return "";
5051
4695
  }
5052
4696
 
5053
- const defaults$n = {
4697
+ const defaults$o = {
5054
4698
  style: "omit",
5055
4699
  };
5056
4700
  class AttributeEmptyStyle extends Rule {
5057
4701
  constructor(options) {
5058
- super({ ...defaults$n, ...options });
4702
+ super({ ...defaults$o, ...options });
5059
4703
  this.hasInvalidStyle = parseStyle$2(this.options.style);
5060
4704
  }
5061
4705
  static schema() {
@@ -5069,7 +4713,7 @@ class AttributeEmptyStyle extends Rule {
5069
4713
  documentation() {
5070
4714
  return {
5071
4715
  description: "Require a specific style for attributes with empty values.",
5072
- url: ruleDocumentationUrl("@/rules/attribute-empty-style.ts"),
4716
+ url: "https://html-validate.org/rules/attribute-empty-style.html",
5073
4717
  };
5074
4718
  }
5075
4719
  setup() {
@@ -5150,7 +4794,7 @@ class AttributeMisuse extends Rule {
5150
4794
  documentation(context) {
5151
4795
  return {
5152
4796
  description: ruleDescription(context),
5153
- url: ruleDocumentationUrl("@/rules/attribute-misuse.ts"),
4797
+ url: "https://html-validate.org/rules/attribute-misuse.html",
5154
4798
  };
5155
4799
  }
5156
4800
  setup() {
@@ -5211,12 +4855,12 @@ function describePattern(pattern) {
5211
4855
  }
5212
4856
  }
5213
4857
 
5214
- const defaults$m = {
4858
+ const defaults$n = {
5215
4859
  pattern: "kebabcase",
5216
4860
  };
5217
4861
  class ClassPattern extends Rule {
5218
4862
  constructor(options) {
5219
- super({ ...defaults$m, ...options });
4863
+ super({ ...defaults$n, ...options });
5220
4864
  this.pattern = parsePattern(this.options.pattern);
5221
4865
  }
5222
4866
  static schema() {
@@ -5230,7 +4874,7 @@ class ClassPattern extends Rule {
5230
4874
  const pattern = describePattern(this.options.pattern);
5231
4875
  return {
5232
4876
  description: `For consistency all classes are required to match the pattern ${pattern}.`,
5233
- url: ruleDocumentationUrl("@/rules/class-pattern.ts"),
4877
+ url: "https://html-validate.org/rules/class-pattern.html",
5234
4878
  };
5235
4879
  }
5236
4880
  setup() {
@@ -5255,7 +4899,7 @@ class CloseAttr extends Rule {
5255
4899
  documentation() {
5256
4900
  return {
5257
4901
  description: "HTML disallows end tags to have attributes.",
5258
- url: ruleDocumentationUrl("@/rules/close-attr.ts"),
4902
+ url: "https://html-validate.org/rules/close-attr.html",
5259
4903
  };
5260
4904
  }
5261
4905
  setup() {
@@ -5281,7 +4925,7 @@ class CloseOrder extends Rule {
5281
4925
  documentation() {
5282
4926
  return {
5283
4927
  description: "HTML requires elements to be closed in the same order as they were opened.",
5284
- url: ruleDocumentationUrl("@/rules/close-order.ts"),
4928
+ url: "https://html-validate.org/rules/close-order.html",
5285
4929
  };
5286
4930
  }
5287
4931
  setup() {
@@ -5325,13 +4969,13 @@ class CloseOrder extends Rule {
5325
4969
  }
5326
4970
  }
5327
4971
 
5328
- const defaults$l = {
4972
+ const defaults$m = {
5329
4973
  include: null,
5330
4974
  exclude: null,
5331
4975
  };
5332
4976
  class Deprecated extends Rule {
5333
4977
  constructor(options) {
5334
- super({ ...defaults$l, ...options });
4978
+ super({ ...defaults$m, ...options });
5335
4979
  }
5336
4980
  static schema() {
5337
4981
  return {
@@ -5366,7 +5010,7 @@ class Deprecated extends Rule {
5366
5010
  documentation(context) {
5367
5011
  const doc = {
5368
5012
  description: "This element is deprecated and should not be used in new code.",
5369
- url: ruleDocumentationUrl("@/rules/deprecated.ts"),
5013
+ url: "https://html-validate.org/rules/deprecated.html",
5370
5014
  };
5371
5015
  if (context) {
5372
5016
  const text = [];
@@ -5453,7 +5097,7 @@ class DeprecatedRule extends Rule {
5453
5097
  const preamble = context ? `The rule "${context}"` : "This rule";
5454
5098
  return {
5455
5099
  description: `${preamble} is deprecated and should not be used any longer, consult documentation for further information.`,
5456
- url: ruleDocumentationUrl("@/rules/deprecated-rule.ts"),
5100
+ url: "https://html-validate.org/rules/deprecated-rule.html",
5457
5101
  };
5458
5102
  }
5459
5103
  setup() {
@@ -5481,7 +5125,7 @@ let NoStyleTag$1 = class NoStyleTag extends Rule {
5481
5125
  "<!DOCTYPE html>",
5482
5126
  "```",
5483
5127
  ].join("\n"),
5484
- url: ruleDocumentationUrl("@/rules/doctype-html.ts"),
5128
+ url: "https://html-validate.org/rules/doctype-html.html",
5485
5129
  };
5486
5130
  }
5487
5131
  setup() {
@@ -5494,12 +5138,12 @@ let NoStyleTag$1 = class NoStyleTag extends Rule {
5494
5138
  }
5495
5139
  };
5496
5140
 
5497
- const defaults$k = {
5141
+ const defaults$l = {
5498
5142
  style: "uppercase",
5499
5143
  };
5500
5144
  class DoctypeStyle extends Rule {
5501
5145
  constructor(options) {
5502
- super({ ...defaults$k, ...options });
5146
+ super({ ...defaults$l, ...options });
5503
5147
  }
5504
5148
  static schema() {
5505
5149
  return {
@@ -5512,7 +5156,7 @@ class DoctypeStyle extends Rule {
5512
5156
  documentation(context) {
5513
5157
  const doc = {
5514
5158
  description: `While DOCTYPE is case-insensitive in the standard the current configuration requires a specific style.`,
5515
- url: ruleDocumentationUrl("@/rules/doctype-style.ts"),
5159
+ url: "https://html-validate.org/rules/doctype-style.html",
5516
5160
  };
5517
5161
  if (context) {
5518
5162
  doc.description = `While DOCTYPE is case-insensitive in the standard the current configuration requires it to be ${context.style}`;
@@ -5531,12 +5175,12 @@ class DoctypeStyle extends Rule {
5531
5175
  }
5532
5176
  }
5533
5177
 
5534
- const defaults$j = {
5178
+ const defaults$k = {
5535
5179
  style: "lowercase",
5536
5180
  };
5537
5181
  class ElementCase extends Rule {
5538
5182
  constructor(options) {
5539
- super({ ...defaults$j, ...options });
5183
+ super({ ...defaults$k, ...options });
5540
5184
  this.style = new CaseStyle(this.options.style, "element-case");
5541
5185
  }
5542
5186
  static schema() {
@@ -5565,7 +5209,7 @@ class ElementCase extends Rule {
5565
5209
  description: Array.isArray(style)
5566
5210
  ? [`Element tagname must be in one of:`, "", ...style.map((it) => `- ${it}`)].join("\n")
5567
5211
  : `Element tagname must be in ${style}.`,
5568
- url: ruleDocumentationUrl("@/rules/element-case.ts"),
5212
+ url: "https://html-validate.org/rules/element-case.html",
5569
5213
  };
5570
5214
  }
5571
5215
  setup() {
@@ -5602,14 +5246,14 @@ class ElementCase extends Rule {
5602
5246
  }
5603
5247
  }
5604
5248
 
5605
- const defaults$i = {
5249
+ const defaults$j = {
5606
5250
  pattern: "^[a-z][a-z0-9\\-._]*-[a-z0-9\\-._]*$",
5607
5251
  whitelist: [],
5608
5252
  blacklist: [],
5609
5253
  };
5610
5254
  class ElementName extends Rule {
5611
5255
  constructor(options) {
5612
- super({ ...defaults$i, ...options });
5256
+ super({ ...defaults$j, ...options });
5613
5257
  // eslint-disable-next-line security/detect-non-literal-regexp
5614
5258
  this.pattern = new RegExp(this.options.pattern);
5615
5259
  }
@@ -5635,7 +5279,7 @@ class ElementName extends Rule {
5635
5279
  documentation(context) {
5636
5280
  return {
5637
5281
  description: this.documentationMessages(context).join("\n"),
5638
- url: ruleDocumentationUrl("@/rules/element-name.ts"),
5282
+ url: "https://html-validate.org/rules/element-name.html",
5639
5283
  };
5640
5284
  }
5641
5285
  documentationMessages(context) {
@@ -5650,7 +5294,7 @@ class ElementName extends Rule {
5650
5294
  ...context.blacklist.map((cur) => `- ${cur}`),
5651
5295
  ];
5652
5296
  }
5653
- if (context.pattern !== defaults$i.pattern) {
5297
+ if (context.pattern !== defaults$j.pattern) {
5654
5298
  return [
5655
5299
  `<${context.tagName}> is not a valid element name. This project is configured to only allow names matching the following regular expression:`,
5656
5300
  "",
@@ -5741,7 +5385,7 @@ class ElementPermittedContent extends Rule {
5741
5385
  documentation(context) {
5742
5386
  return {
5743
5387
  description: getRuleDescription$2(context).join("\n"),
5744
- url: ruleDocumentationUrl("@/rules/element-permitted-content.ts"),
5388
+ url: "https://html-validate.org/rules/element-permitted-content.html",
5745
5389
  };
5746
5390
  }
5747
5391
  setup() {
@@ -5834,7 +5478,7 @@ class ElementPermittedOccurrences extends Rule {
5834
5478
  documentation() {
5835
5479
  return {
5836
5480
  description: "Some elements may only be used a fixed amount of times in given context.",
5837
- url: ruleDocumentationUrl("@/rules/element-permitted-occurrences.ts"),
5481
+ url: "https://html-validate.org/rules/element-permitted-occurrences.html",
5838
5482
  };
5839
5483
  }
5840
5484
  setup() {
@@ -5868,7 +5512,7 @@ class ElementPermittedOrder extends Rule {
5868
5512
  documentation() {
5869
5513
  return {
5870
5514
  description: "Some elements has a specific order the children must use.",
5871
- url: ruleDocumentationUrl("@/rules/element-permitted-order.ts"),
5515
+ url: "https://html-validate.org/rules/element-permitted-order.html",
5872
5516
  };
5873
5517
  }
5874
5518
  setup() {
@@ -5936,7 +5580,7 @@ class ElementPermittedParent extends Rule {
5936
5580
  documentation(context) {
5937
5581
  return {
5938
5582
  description: getRuleDescription$1(context).join("\n"),
5939
- url: ruleDocumentationUrl("@/rules/element-permitted-parent.ts"),
5583
+ url: "https://html-validate.org/rules/element-permitted-parent.html",
5940
5584
  };
5941
5585
  }
5942
5586
  setup() {
@@ -5999,7 +5643,7 @@ class ElementRequiredAncestor extends Rule {
5999
5643
  documentation(context) {
6000
5644
  return {
6001
5645
  description: getRuleDescription(context).join("\n"),
6002
- url: ruleDocumentationUrl("@/rules/element-required-ancestor.ts"),
5646
+ url: "https://html-validate.org/rules/element-required-ancestor.html",
6003
5647
  };
6004
5648
  }
6005
5649
  setup() {
@@ -6042,7 +5686,7 @@ class ElementRequiredAttributes extends Rule {
6042
5686
  documentation(context) {
6043
5687
  const docs = {
6044
5688
  description: "Element is missing a required attribute",
6045
- url: ruleDocumentationUrl("@/rules/element-required-attributes.ts"),
5689
+ url: "https://html-validate.org/rules/element-required-attributes.html",
6046
5690
  };
6047
5691
  if (context) {
6048
5692
  docs.description = `The <${context.element}> element is required to have a "${context.attribute}" attribute.`;
@@ -6079,13 +5723,13 @@ class ElementRequiredContent extends Rule {
6079
5723
  const { element, missing } = context;
6080
5724
  return {
6081
5725
  description: `The \`${element}\` element requires a \`${missing}\` to be present as content.`,
6082
- url: ruleDocumentationUrl("@/rules/element-required-content.ts"),
5726
+ url: "https://html-validate.org/rules/element-required-content.html",
6083
5727
  };
6084
5728
  }
6085
5729
  else {
6086
5730
  return {
6087
5731
  description: "Some elements has requirements on content that must be present.",
6088
- url: ruleDocumentationUrl("@/rules/element-required-content.ts"),
5732
+ url: "https://html-validate.org/rules/element-required-content.html",
6089
5733
  };
6090
5734
  }
6091
5735
  }
@@ -6116,7 +5760,7 @@ class ElementRequiredContent extends Rule {
6116
5760
  }
6117
5761
 
6118
5762
  const selector = ["h1", "h2", "h3", "h4", "h5", "h6"].join(",");
6119
- function hasImgAltText$1(node) {
5763
+ function hasImgAltText(node) {
6120
5764
  if (node.is("img")) {
6121
5765
  return hasAltText(node);
6122
5766
  }
@@ -6131,7 +5775,7 @@ class EmptyHeading extends Rule {
6131
5775
  documentation() {
6132
5776
  return {
6133
5777
  description: `Assistive technology such as screen readers require textual content in headings. Whitespace only is considered empty.`,
6134
- url: ruleDocumentationUrl("@/rules/empty-heading.ts"),
5778
+ url: "https://html-validate.org/rules/empty-heading.html",
6135
5779
  };
6136
5780
  }
6137
5781
  setup() {
@@ -6145,7 +5789,7 @@ class EmptyHeading extends Rule {
6145
5789
  validateHeading(heading) {
6146
5790
  const images = heading.querySelectorAll("img, svg");
6147
5791
  for (const child of images) {
6148
- if (hasImgAltText$1(child)) {
5792
+ if (hasImgAltText(child)) {
6149
5793
  return;
6150
5794
  }
6151
5795
  }
@@ -6173,7 +5817,7 @@ class EmptyTitle extends Rule {
6173
5817
  "",
6174
5818
  "Whitespace is ignored.",
6175
5819
  ].join("\n"),
6176
- url: ruleDocumentationUrl("@/rules/empty-title.ts"),
5820
+ url: "https://html-validate.org/rules/empty-title.html",
6177
5821
  };
6178
5822
  }
6179
5823
  setup() {
@@ -6198,7 +5842,7 @@ class EmptyTitle extends Rule {
6198
5842
  }
6199
5843
  }
6200
5844
 
6201
- const defaults$h = {
5845
+ const defaults$i = {
6202
5846
  allowMultipleH1: false,
6203
5847
  minInitialRank: "h1",
6204
5848
  sectioningRoots: ["dialog", '[role="dialog"]'],
@@ -6229,7 +5873,7 @@ function parseMaxInitial(value) {
6229
5873
  }
6230
5874
  class HeadingLevel extends Rule {
6231
5875
  constructor(options) {
6232
- super({ ...defaults$h, ...options });
5876
+ super({ ...defaults$i, ...options });
6233
5877
  this.stack = [];
6234
5878
  this.minInitialRank = parseMaxInitial(this.options.minInitialRank);
6235
5879
  this.sectionRoots = this.options.sectioningRoots.map((it) => new Pattern(it));
@@ -6267,7 +5911,7 @@ class HeadingLevel extends Rule {
6267
5911
  }
6268
5912
  return {
6269
5913
  description: text.join("\n"),
6270
- url: ruleDocumentationUrl("@/rules/heading-level.ts"),
5914
+ url: "https://html-validate.org/rules/heading-level.html",
6271
5915
  };
6272
5916
  }
6273
5917
  setup() {
@@ -6387,12 +6031,12 @@ class HeadingLevel extends Rule {
6387
6031
  }
6388
6032
  }
6389
6033
 
6390
- const defaults$g = {
6034
+ const defaults$h = {
6391
6035
  pattern: "kebabcase",
6392
6036
  };
6393
6037
  class IdPattern extends Rule {
6394
6038
  constructor(options) {
6395
- super({ ...defaults$g, ...options });
6039
+ super({ ...defaults$h, ...options });
6396
6040
  this.pattern = parsePattern(this.options.pattern);
6397
6041
  }
6398
6042
  static schema() {
@@ -6406,7 +6050,7 @@ class IdPattern extends Rule {
6406
6050
  const pattern = describePattern(this.options.pattern);
6407
6051
  return {
6408
6052
  description: `For consistency all IDs are required to match the pattern ${pattern}.`,
6409
- url: ruleDocumentationUrl("@/rules/id-pattern.ts"),
6053
+ url: "https://html-validate.org/rules/id-pattern.html",
6410
6054
  };
6411
6055
  }
6412
6056
  setup() {
@@ -6538,13 +6182,13 @@ class InputAttributes extends Rule {
6538
6182
  const list = (_b = (_a = restricted.get(attribute)) === null || _a === void 0 ? void 0 : _a.map((it) => `- \`${it}\``)) !== null && _b !== void 0 ? _b : [];
6539
6183
  return {
6540
6184
  description: [summary, details, ...list].join("\n"),
6541
- url: ruleDocumentationUrl("@/rules/input-attributes.ts"),
6185
+ url: "https://html-validate.org/rules/input-attributes.html",
6542
6186
  };
6543
6187
  }
6544
6188
  else {
6545
6189
  return {
6546
6190
  description: `This attribute cannot be used with this input type.`,
6547
- url: ruleDocumentationUrl("@/rules/input-attributes.ts"),
6191
+ url: "https://html-validate.org/rules/input-attributes.html",
6548
6192
  };
6549
6193
  }
6550
6194
  }
@@ -6575,126 +6219,6 @@ class InputAttributes extends Rule {
6575
6219
  }
6576
6220
  }
6577
6221
 
6578
- const HAS_ACCESSIBLE_TEXT_CACHE = Symbol(hasAccessibleName.name);
6579
- function isHidden(node, context) {
6580
- const { reference } = context;
6581
- if (reference && reference.isSameNode(node)) {
6582
- return false;
6583
- }
6584
- else {
6585
- return isHTMLHidden(node) || !inAccessibilityTree(node);
6586
- }
6587
- }
6588
- function hasImgAltText(node, context) {
6589
- if (node.is("img")) {
6590
- return hasAltText(node);
6591
- }
6592
- else if (node.is("svg")) {
6593
- return node.textContent.trim() !== "";
6594
- }
6595
- else {
6596
- for (const img of node.querySelectorAll("img, svg")) {
6597
- const hasName = hasAccessibleNameImpl(img, context);
6598
- if (hasName) {
6599
- return true;
6600
- }
6601
- }
6602
- return false;
6603
- }
6604
- }
6605
- function hasLabel(node) {
6606
- var _a;
6607
- const value = (_a = node.getAttributeValue("aria-label")) !== null && _a !== void 0 ? _a : "";
6608
- return Boolean(value.trim());
6609
- }
6610
- function isLabelledby(node, context) {
6611
- const { document, reference } = context;
6612
- /* if we already have resolved one level of reference we don't resolve another
6613
- * level (as per accname step 2B) */
6614
- if (reference) {
6615
- return false;
6616
- }
6617
- const ariaLabelledby = node.ariaLabelledby;
6618
- /* consider dynamic aria-labelledby as having a name as we cannot resolve it
6619
- * so no way to prove correctness */
6620
- if (ariaLabelledby instanceof DynamicValue) {
6621
- return true;
6622
- }
6623
- /* ignore elements without aria-labelledby */
6624
- if (ariaLabelledby === null) {
6625
- return false;
6626
- }
6627
- return ariaLabelledby.some((id) => {
6628
- const selector = generateIdSelector(id);
6629
- return document.querySelectorAll(selector).some((child) => {
6630
- return hasAccessibleNameImpl(child, {
6631
- document,
6632
- reference: child,
6633
- });
6634
- });
6635
- });
6636
- }
6637
- /**
6638
- * This algorithm is based on ["Accessible Name and Description Computation
6639
- * 1.2"][accname] with some exceptions:
6640
- *
6641
- * It doesn't compute the actual name but only the presence of one, e.g. if a
6642
- * non-empty flat string is present the algorithm terminates with a positive
6643
- * result.
6644
- *
6645
- * It takes some optimization shortcuts such as starting with step F as it
6646
- * would be more common usage and as there is no actual name being computed
6647
- * the order wont matter.
6648
- *
6649
- * [accname]: https://w3c.github.io/accname
6650
- */
6651
- function hasAccessibleNameImpl(current, context) {
6652
- const { reference } = context;
6653
- /* if this element is hidden (see function for exceptions) it does not have an accessible name */
6654
- if (isHidden(current, context)) {
6655
- return false;
6656
- }
6657
- /* special case: when this element is directly referenced by aria-labelledby
6658
- * we ignore `hidden` */
6659
- const ignoreHiddenRoot = Boolean(reference && reference.isSameNode(current));
6660
- const text = classifyNodeText(current, { accessible: true, ignoreHiddenRoot });
6661
- if (text !== TextClassification.EMPTY_TEXT) {
6662
- return true;
6663
- }
6664
- if (hasImgAltText(current, context)) {
6665
- return true;
6666
- }
6667
- if (hasLabel(current)) {
6668
- return true;
6669
- }
6670
- if (isLabelledby(current, context)) {
6671
- return true;
6672
- }
6673
- return false;
6674
- }
6675
- /**
6676
- * Returns `true` if the element has an accessible name.
6677
- *
6678
- * It does not yet consider if the elements role prohibits naming, e.g. a `<p>`
6679
- * element will still show up as having an accessible name.
6680
- *
6681
- * @public
6682
- * @param document - Document element.
6683
- * @param current - The element to get accessible name for
6684
- * @returns `true` if the element has an accessible name.
6685
- */
6686
- function hasAccessibleName(document, current) {
6687
- /* istanbul ignore next: we're not testing cache */
6688
- if (current.cacheExists(HAS_ACCESSIBLE_TEXT_CACHE)) {
6689
- return Boolean(current.cacheGet(HAS_ACCESSIBLE_TEXT_CACHE));
6690
- }
6691
- const result = hasAccessibleNameImpl(current, {
6692
- document,
6693
- reference: null,
6694
- });
6695
- return current.cacheSet(HAS_ACCESSIBLE_TEXT_CACHE, result);
6696
- }
6697
-
6698
6222
  function isIgnored(node) {
6699
6223
  var _a;
6700
6224
  if (node.is("input")) {
@@ -6717,7 +6241,7 @@ class InputMissingLabel extends Rule {
6717
6241
  " - Use a nested `<label>` as parent element.",
6718
6242
  " - Use `aria-label` or `aria-labelledby` attributes.",
6719
6243
  ].join("\n"),
6720
- url: ruleDocumentationUrl("@/rules/input-missing-label.ts"),
6244
+ url: "https://html-validate.org/rules/input-missing-label.html",
6721
6245
  };
6722
6246
  }
6723
6247
  setup() {
@@ -6794,12 +6318,12 @@ function findLabelByParent(el) {
6794
6318
  return [];
6795
6319
  }
6796
6320
 
6797
- const defaults$f = {
6321
+ const defaults$g = {
6798
6322
  maxlength: 70,
6799
6323
  };
6800
6324
  class LongTitle extends Rule {
6801
6325
  constructor(options) {
6802
- super({ ...defaults$f, ...options });
6326
+ super({ ...defaults$g, ...options });
6803
6327
  this.maxlength = this.options.maxlength;
6804
6328
  }
6805
6329
  static schema() {
@@ -6812,7 +6336,7 @@ class LongTitle extends Rule {
6812
6336
  documentation() {
6813
6337
  return {
6814
6338
  description: `Search engines truncates titles with long text, possibly down-ranking the page in the process.`,
6815
- url: ruleDocumentationUrl("@/rules/long-title.ts"),
6339
+ url: "https://html-validate.org/rules/long-title.html",
6816
6340
  };
6817
6341
  }
6818
6342
  setup() {
@@ -6832,7 +6356,7 @@ class MetaRefresh extends Rule {
6832
6356
  documentation() {
6833
6357
  return {
6834
6358
  description: `Meta refresh directive must use the \`0;url=...\` format. Non-zero values for time interval is disallowed as people with assistive technology might be unable to read and understand the page content before automatically reloading. For the same reason skipping the url is disallowed as it would put the browser in an infinite loop reloading the same page over and over again.`,
6835
- url: ruleDocumentationUrl("@/rules/meta-refresh.ts"),
6359
+ url: "https://html-validate.org/rules/meta-refresh.html",
6836
6360
  };
6837
6361
  }
6838
6362
  setup() {
@@ -6882,11 +6406,54 @@ function parseContent(text) {
6882
6406
  }
6883
6407
  }
6884
6408
 
6409
+ function getName(attr) {
6410
+ const name = attr.value;
6411
+ if (!name || name instanceof DynamicValue) {
6412
+ return null;
6413
+ }
6414
+ return name;
6415
+ }
6416
+ class MapDupName extends Rule {
6417
+ documentation() {
6418
+ return {
6419
+ description: "`<map>` must have a unique name, it cannot be the same name as another `<map>` element",
6420
+ url: "https://html-validate.org/rules/map-dup-name.html",
6421
+ };
6422
+ }
6423
+ setup() {
6424
+ this.on("dom:ready", (event) => {
6425
+ const { document } = event;
6426
+ const maps = document.querySelectorAll("map[name]");
6427
+ const names = new Set();
6428
+ for (const map of maps) {
6429
+ const attr = map.getAttribute("name");
6430
+ /* istanbul ignore next -- should not happen as querySelector matches
6431
+ * only the elements with the name attribute */
6432
+ if (!attr) {
6433
+ continue;
6434
+ }
6435
+ const name = getName(attr);
6436
+ if (!name) {
6437
+ continue;
6438
+ }
6439
+ if (names.has(name)) {
6440
+ this.report({
6441
+ node: map,
6442
+ message: `<map> name must be unique`,
6443
+ location: attr.keyLocation,
6444
+ });
6445
+ }
6446
+ names.add(name);
6447
+ }
6448
+ });
6449
+ }
6450
+ }
6451
+
6885
6452
  class MissingDoctype extends Rule {
6886
6453
  documentation() {
6887
6454
  return {
6888
6455
  description: "Requires that the document contains a doctype.",
6889
- url: ruleDocumentationUrl("@/rules/missing-doctype.ts"),
6456
+ url: "https://html-validate.org/rules/missing-doctype.html",
6890
6457
  };
6891
6458
  }
6892
6459
  setup() {
@@ -6907,7 +6474,7 @@ class MultipleLabeledControls extends Rule {
6907
6474
  documentation() {
6908
6475
  return {
6909
6476
  description: `A \`<label>\` element can only be associated with one control at a time.`,
6910
- url: ruleDocumentationUrl("@/rules/multiple-labeled-controls.ts"),
6477
+ url: "https://html-validate.org/rules/multiple-labeled-controls.html",
6911
6478
  };
6912
6479
  }
6913
6480
  setup() {
@@ -6946,13 +6513,13 @@ class MultipleLabeledControls extends Rule {
6946
6513
  }
6947
6514
  }
6948
6515
 
6949
- const defaults$e = {
6516
+ const defaults$f = {
6950
6517
  include: null,
6951
6518
  exclude: null,
6952
6519
  };
6953
6520
  class NoAutoplay extends Rule {
6954
6521
  constructor(options) {
6955
- super({ ...defaults$e, ...options });
6522
+ super({ ...defaults$f, ...options });
6956
6523
  }
6957
6524
  documentation(context) {
6958
6525
  const tagName = context ? ` on <${context.tagName}>` : "";
@@ -6962,7 +6529,7 @@ class NoAutoplay extends Rule {
6962
6529
  "Autoplaying content can be disruptive for users and has accessibilty concerns.",
6963
6530
  "Prefer to let the user control playback.",
6964
6531
  ].join("\n"),
6965
- url: ruleDocumentationUrl("@/rules/no-autoplay.ts"),
6532
+ url: "https://html-validate.org/rules/no-autoplay.html",
6966
6533
  };
6967
6534
  }
6968
6535
  static schema() {
@@ -7022,7 +6589,7 @@ class NoConditionalComment extends Rule {
7022
6589
  documentation() {
7023
6590
  return {
7024
6591
  description: "Microsoft Internet Explorer previously supported using special HTML comments (conditional comments) for targeting specific versions of IE but since IE 10 it is deprecated and not supported in standards mode.",
7025
- url: ruleDocumentationUrl("@/rules/no-conditional-comment.ts"),
6592
+ url: "https://html-validate.org/rules/no-conditional-comment.html",
7026
6593
  };
7027
6594
  }
7028
6595
  setup() {
@@ -7036,7 +6603,7 @@ class NoDeprecatedAttr extends Rule {
7036
6603
  documentation() {
7037
6604
  return {
7038
6605
  description: "HTML5 deprecated many old attributes.",
7039
- url: ruleDocumentationUrl("@/rules/no-deprecated-attr.ts"),
6606
+ url: "https://html-validate.org/rules/no-deprecated-attr.html",
7040
6607
  };
7041
6608
  }
7042
6609
  setup() {
@@ -7064,7 +6631,7 @@ class NoDupAttr extends Rule {
7064
6631
  documentation() {
7065
6632
  return {
7066
6633
  description: "HTML disallows two or more attributes with the same (case-insensitive) name.",
7067
- url: ruleDocumentationUrl("@/rules/no-dup-attr.ts"),
6634
+ url: "https://html-validate.org/rules/no-dup-attr.html",
7068
6635
  };
7069
6636
  }
7070
6637
  setup() {
@@ -7091,7 +6658,7 @@ class NoDupClass extends Rule {
7091
6658
  documentation() {
7092
6659
  return {
7093
6660
  description: "Prevents unnecessary duplication of class names.",
7094
- url: ruleDocumentationUrl("@/rules/no-dup-class.ts"),
6661
+ url: "https://html-validate.org/rules/no-dup-class.html",
7095
6662
  };
7096
6663
  }
7097
6664
  setup() {
@@ -7116,7 +6683,7 @@ class NoDupID extends Rule {
7116
6683
  documentation() {
7117
6684
  return {
7118
6685
  description: "The ID of an element must be unique.",
7119
- url: ruleDocumentationUrl("@/rules/no-dup-id.ts"),
6686
+ url: "https://html-validate.org/rules/no-dup-id.html",
7120
6687
  };
7121
6688
  }
7122
6689
  setup() {
@@ -7163,7 +6730,7 @@ class NoImplicitClose extends Rule {
7163
6730
  description: `Some elements in HTML has optional end tags. When an optional tag is omitted a browser must handle it as if the end tag was present.
7164
6731
 
7165
6732
  Omitted end tags can be ambigious for humans to read and many editors have trouble formatting the markup.`,
7166
- url: ruleDocumentationUrl("@/rules/no-implicit-close.ts"),
6733
+ url: "https://html-validate.org/rules/no-implicit-close.html",
7167
6734
  };
7168
6735
  }
7169
6736
  setup() {
@@ -7193,14 +6760,14 @@ Omitted end tags can be ambigious for humans to read and many editors have troub
7193
6760
  }
7194
6761
  }
7195
6762
 
7196
- const defaults$d = {
6763
+ const defaults$e = {
7197
6764
  include: null,
7198
6765
  exclude: null,
7199
6766
  allowedProperties: ["display"],
7200
6767
  };
7201
6768
  class NoInlineStyle extends Rule {
7202
6769
  constructor(options) {
7203
- super({ ...defaults$d, ...options });
6770
+ super({ ...defaults$e, ...options });
7204
6771
  }
7205
6772
  static schema() {
7206
6773
  return {
@@ -7249,7 +6816,7 @@ class NoInlineStyle extends Rule {
7249
6816
  }
7250
6817
  return {
7251
6818
  description: text.join("\n"),
7252
- url: ruleDocumentationUrl("@/rules/no-inline-style.ts"),
6819
+ url: "https://html-validate.org/rules/no-inline-style.html",
7253
6820
  };
7254
6821
  }
7255
6822
  setup() {
@@ -7310,13 +6877,13 @@ class NoMissingReferences extends Rule {
7310
6877
  if (context) {
7311
6878
  return {
7312
6879
  description: `The element ID "${context.value}" referenced by the ${context.key} attribute must point to an existing element.`,
7313
- url: ruleDocumentationUrl("@/rules/no-missing-references.ts"),
6880
+ url: "https://html-validate.org/rules/no-missing-references.html",
7314
6881
  };
7315
6882
  }
7316
6883
  else {
7317
6884
  return {
7318
6885
  description: `The element ID referenced by the attribute must point to an existing element.`,
7319
- url: ruleDocumentationUrl("@/rules/no-missing-references.ts"),
6886
+ url: "https://html-validate.org/rules/no-missing-references.html",
7320
6887
  };
7321
6888
  }
7322
6889
  }
@@ -7386,7 +6953,7 @@ class NoMultipleMain extends Rule {
7386
6953
  "",
7387
6954
  "Multiple `<main>` can be present in the DOM as long the others are hidden using the HTML5 `hidden` attribute.",
7388
6955
  ].join("\n"),
7389
- url: ruleDocumentationUrl("@/rules/no-multiple-main.ts"),
6956
+ url: "https://html-validate.org/rules/no-multiple-main.html",
7390
6957
  };
7391
6958
  }
7392
6959
  setup() {
@@ -7402,7 +6969,7 @@ class NoMultipleMain extends Rule {
7402
6969
  }
7403
6970
  }
7404
6971
 
7405
- const defaults$c = {
6972
+ const defaults$d = {
7406
6973
  relaxed: false,
7407
6974
  };
7408
6975
  const textRegexp = /([<>]|&(?![a-zA-Z0-9#]+;))/g;
@@ -7419,7 +6986,7 @@ const replacementTable = {
7419
6986
  };
7420
6987
  class NoRawCharacters extends Rule {
7421
6988
  constructor(options) {
7422
- super({ ...defaults$c, ...options });
6989
+ super({ ...defaults$d, ...options });
7423
6990
  this.relaxed = this.options.relaxed;
7424
6991
  }
7425
6992
  static schema() {
@@ -7432,7 +6999,7 @@ class NoRawCharacters extends Rule {
7432
6999
  documentation() {
7433
7000
  return {
7434
7001
  description: `Some characters such as \`<\`, \`>\` and \`&\` hold special meaning in HTML and must be escaped using a character reference (html entity).`,
7435
- url: ruleDocumentationUrl("@/rules/no-raw-characters.ts"),
7002
+ url: "https://html-validate.org/rules/no-raw-characters.html",
7436
7003
  };
7437
7004
  }
7438
7005
  setup() {
@@ -7497,7 +7064,7 @@ class NoRedundantFor extends Rule {
7497
7064
  documentation() {
7498
7065
  return {
7499
7066
  description: `When the \`<label>\` element wraps the labelable control the \`for\` attribute is redundant and better left out.`,
7500
- url: ruleDocumentationUrl("@/rules/no-redundant-for.ts"),
7067
+ url: "https://html-validate.org/rules/no-redundant-for.html",
7501
7068
  };
7502
7069
  }
7503
7070
  setup() {
@@ -7559,7 +7126,7 @@ class NoRedundantRole extends Rule {
7559
7126
  documentation(context) {
7560
7127
  const doc = {
7561
7128
  description: `Using this role is redundant as it is already implied by the element.`,
7562
- url: ruleDocumentationUrl("@/rules/no-redundant-role.ts"),
7129
+ url: "https://html-validate.org/rules/no-redundant-role.html",
7563
7130
  };
7564
7131
  if (context) {
7565
7132
  doc.description = `Using the "${context.role}" role is redundant as it is already implied by the <${context.tagname}> element.`;
@@ -7597,13 +7164,13 @@ class NoRedundantRole extends Rule {
7597
7164
  }
7598
7165
 
7599
7166
  const xmlns = /^(.+):.+$/;
7600
- const defaults$b = {
7167
+ const defaults$c = {
7601
7168
  ignoreForeign: true,
7602
7169
  ignoreXML: true,
7603
7170
  };
7604
7171
  class NoSelfClosing extends Rule {
7605
7172
  constructor(options) {
7606
- super({ ...defaults$b, ...options });
7173
+ super({ ...defaults$c, ...options });
7607
7174
  }
7608
7175
  static schema() {
7609
7176
  return {
@@ -7619,7 +7186,7 @@ class NoSelfClosing extends Rule {
7619
7186
  tagName = tagName || "element";
7620
7187
  return {
7621
7188
  description: `Self-closing elements are disallowed. Use regular end tag <${tagName}></${tagName}> instead of self-closing <${tagName}/>.`,
7622
- url: ruleDocumentationUrl("@/rules/no-self-closing.ts"),
7189
+ url: "https://html-validate.org/rules/no-self-closing.html",
7623
7190
  };
7624
7191
  }
7625
7192
  setup() {
@@ -7663,7 +7230,7 @@ class NoStyleTag extends Rule {
7663
7230
  documentation() {
7664
7231
  return {
7665
7232
  description: "Prefer to use external stylesheets with the `<link>` tag instead of inlining the styling.",
7666
- url: ruleDocumentationUrl("@/rules/no-style-tag.ts"),
7233
+ url: "https://html-validate.org/rules/no-style-tag.html",
7667
7234
  };
7668
7235
  }
7669
7236
  setup() {
@@ -7680,7 +7247,7 @@ class NoTrailingWhitespace extends Rule {
7680
7247
  documentation() {
7681
7248
  return {
7682
7249
  description: "Lines with trailing whitespace cause unnessecary diff when using version control and usually serve no special purpose in HTML.",
7683
- url: ruleDocumentationUrl("@/rules/no-trailing-whitespace.ts"),
7250
+ url: "https://html-validate.org/rules/no-trailing-whitespace.html",
7684
7251
  };
7685
7252
  }
7686
7253
  setup() {
@@ -7697,7 +7264,7 @@ class NoUnknownElements extends Rule {
7697
7264
  const element = context ? ` <${context}>` : "";
7698
7265
  return {
7699
7266
  description: `An unknown element${element} was used. If this is a Custom Element you need to supply element metadata for it.`,
7700
- url: ruleDocumentationUrl("@/rules/no-unknown-elements.ts"),
7267
+ url: "https://html-validate.org/rules/no-unknown-elements.html",
7701
7268
  };
7702
7269
  }
7703
7270
  setup() {
@@ -7714,7 +7281,7 @@ class NoUtf8Bom extends Rule {
7714
7281
  documentation() {
7715
7282
  return {
7716
7283
  description: `This file is saved with the UTF-8 byte order mark (BOM) present. It is neither required or recommended to use.\n\nInstead the document should be served with the \`Content-Type: application/javascript; charset=utf-8\` header.`,
7717
- url: ruleDocumentationUrl("@/rules/no-utf8-bom.ts"),
7284
+ url: "https://html-validate.org/rules/no-utf8-bom.html",
7718
7285
  };
7719
7286
  }
7720
7287
  setup() {
@@ -7736,13 +7303,13 @@ const replacement = {
7736
7303
  reset: '<button type="reset">',
7737
7304
  image: '<button type="button">',
7738
7305
  };
7739
- const defaults$a = {
7306
+ const defaults$b = {
7740
7307
  include: null,
7741
7308
  exclude: null,
7742
7309
  };
7743
7310
  class PreferButton extends Rule {
7744
7311
  constructor(options) {
7745
- super({ ...defaults$a, ...options });
7312
+ super({ ...defaults$b, ...options });
7746
7313
  }
7747
7314
  static schema() {
7748
7315
  return {
@@ -7777,7 +7344,7 @@ class PreferButton extends Rule {
7777
7344
  documentation(context) {
7778
7345
  const doc = {
7779
7346
  description: `Prefer to use the generic \`<button>\` element instead of \`<input>\`.`,
7780
- url: ruleDocumentationUrl("@/rules/prefer-button.ts"),
7347
+ url: "https://html-validate.org/rules/prefer-button.html",
7781
7348
  };
7782
7349
  if (context) {
7783
7350
  const src = `<input type="${context.type}">`;
@@ -7817,7 +7384,7 @@ class PreferButton extends Rule {
7817
7384
  }
7818
7385
  }
7819
7386
 
7820
- const defaults$9 = {
7387
+ const defaults$a = {
7821
7388
  mapping: {
7822
7389
  article: "article",
7823
7390
  banner: "header",
@@ -7847,7 +7414,7 @@ const defaults$9 = {
7847
7414
  };
7848
7415
  class PreferNativeElement extends Rule {
7849
7416
  constructor(options) {
7850
- super({ ...defaults$9, ...options });
7417
+ super({ ...defaults$a, ...options });
7851
7418
  }
7852
7419
  static schema() {
7853
7420
  return {
@@ -7885,7 +7452,7 @@ class PreferNativeElement extends Rule {
7885
7452
  documentation(context) {
7886
7453
  const doc = {
7887
7454
  description: `Instead of using WAI-ARIA roles prefer to use the native HTML elements.`,
7888
- url: ruleDocumentationUrl("@/rules/prefer-native-element.ts"),
7455
+ url: "https://html-validate.org/rules/prefer-native-element.html",
7889
7456
  };
7890
7457
  if (context) {
7891
7458
  doc.description = `Instead of using the WAI-ARIA role "${context.role}" prefer to use the native <${context.replacement}> element.`;
@@ -7948,7 +7515,7 @@ class PreferTbody extends Rule {
7948
7515
  documentation() {
7949
7516
  return {
7950
7517
  description: `While \`<tbody>\` is optional is relays semantic information about its contents. Where applicable it should also be combined with \`<thead>\` and \`<tfoot>\`.`,
7951
- url: ruleDocumentationUrl("@/rules/prefer-tbody.ts"),
7518
+ url: "https://html-validate.org/rules/prefer-tbody.html",
7952
7519
  };
7953
7520
  }
7954
7521
  setup() {
@@ -7967,12 +7534,12 @@ class PreferTbody extends Rule {
7967
7534
  }
7968
7535
  }
7969
7536
 
7970
- const defaults$8 = {
7537
+ const defaults$9 = {
7971
7538
  tags: ["script", "style"],
7972
7539
  };
7973
7540
  class RequireCSPNonce extends Rule {
7974
7541
  constructor(options) {
7975
- super({ ...defaults$8, ...options });
7542
+ super({ ...defaults$9, ...options });
7976
7543
  }
7977
7544
  static schema() {
7978
7545
  return {
@@ -7996,7 +7563,7 @@ class RequireCSPNonce extends Rule {
7996
7563
  "The nonce should be unique per each request and set to a cryptography secure random token.",
7997
7564
  "It is used to prevent cross site scripting (XSS) by preventing malicious actors from injecting scripts onto the page.",
7998
7565
  ].join("\n"),
7999
- url: ruleDocumentationUrl("@/rules/require-csp-nonce.ts"),
7566
+ url: "https://html-validate.org/rules/require-csp-nonce.html",
8000
7567
  };
8001
7568
  }
8002
7569
  setup() {
@@ -8023,7 +7590,7 @@ class RequireCSPNonce extends Rule {
8023
7590
  }
8024
7591
  }
8025
7592
 
8026
- const defaults$7 = {
7593
+ const defaults$8 = {
8027
7594
  target: "all",
8028
7595
  include: null,
8029
7596
  exclude: null,
@@ -8035,7 +7602,7 @@ const supportSri = {
8035
7602
  };
8036
7603
  class RequireSri extends Rule {
8037
7604
  constructor(options) {
8038
- super({ ...defaults$7, ...options });
7605
+ super({ ...defaults$8, ...options });
8039
7606
  this.target = this.options.target;
8040
7607
  }
8041
7608
  static schema() {
@@ -8075,7 +7642,7 @@ class RequireSri extends Rule {
8075
7642
  documentation() {
8076
7643
  return {
8077
7644
  description: `Subresource Integrity (SRI) \`integrity\` attribute is required to prevent manipulation from Content Delivery Networks or other third-party hosting.`,
8078
- url: ruleDocumentationUrl("@/rules/require-sri.ts"),
7645
+ url: "https://html-validate.org/rules/require-sri.html",
8079
7646
  };
8080
7647
  }
8081
7648
  setup() {
@@ -8121,7 +7688,7 @@ class ScriptElement extends Rule {
8121
7688
  documentation() {
8122
7689
  return {
8123
7690
  description: "The end tag for `<script>` is a hard requirement and must never be omitted even when using the `src` attribute.",
8124
- url: ruleDocumentationUrl("@/rules/script-element.ts"),
7691
+ url: "https://html-validate.org/rules/script-element.html",
8125
7692
  };
8126
7693
  }
8127
7694
  setup() {
@@ -8148,7 +7715,7 @@ class ScriptType extends Rule {
8148
7715
  documentation() {
8149
7716
  return {
8150
7717
  description: "While valid the HTML5 standard encourages authors to omit the type element for JavaScript resources.",
8151
- url: ruleDocumentationUrl("@/rules/script-type.ts"),
7718
+ url: "https://html-validate.org/rules/script-type.html",
8152
7719
  };
8153
7720
  }
8154
7721
  setup() {
@@ -8179,7 +7746,7 @@ class SvgFocusable extends Rule {
8179
7746
  documentation() {
8180
7747
  return {
8181
7748
  description: `Inline SVG elements in IE are focusable by default which may cause issues with tab-ordering. The \`focusable\` attribute should explicitly be set to avoid unintended behaviour.`,
8182
- url: ruleDocumentationUrl("@/rules/svg-focusable.ts"),
7749
+ url: "https://html-validate.org/rules/svg-focusable.html",
8183
7750
  };
8184
7751
  }
8185
7752
  setup() {
@@ -8197,7 +7764,7 @@ class SvgFocusable extends Rule {
8197
7764
  }
8198
7765
  }
8199
7766
 
8200
- const defaults$6 = {
7767
+ const defaults$7 = {
8201
7768
  characters: [
8202
7769
  { pattern: " ", replacement: "&nbsp;", description: "non-breaking space" },
8203
7770
  { pattern: "-", replacement: "&#8209;", description: "non-breaking hyphen" },
@@ -8240,7 +7807,7 @@ function matchAll(text, regexp) {
8240
7807
  }
8241
7808
  class TelNonBreaking extends Rule {
8242
7809
  constructor(options) {
8243
- super({ ...defaults$6, ...options });
7810
+ super({ ...defaults$7, ...options });
8244
7811
  this.regex = constructRegex(this.options.characters);
8245
7812
  }
8246
7813
  static schema() {
@@ -8292,7 +7859,7 @@ class TelNonBreaking extends Rule {
8292
7859
  "",
8293
7860
  ...replacements,
8294
7861
  ].join("\n"),
8295
- url: ruleDocumentationUrl("@/rules/tel-non-breaking.ts"),
7862
+ url: "https://html-validate.org/rules/tel-non-breaking.html",
8296
7863
  };
8297
7864
  }
8298
7865
  setup() {
@@ -8439,7 +8006,7 @@ class TextContent extends Rule {
8439
8006
  documentation(context) {
8440
8007
  const doc = {
8441
8008
  description: `The textual content for this element is not valid.`,
8442
- url: ruleDocumentationUrl("@/rules/text-content.ts"),
8009
+ url: "https://html-validate.org/rules/text-content.html",
8443
8010
  };
8444
8011
  if (context === null || context === void 0 ? void 0 : context.textContent) {
8445
8012
  switch (context.textContent) {
@@ -8528,1737 +8095,64 @@ class TextContent extends Rule {
8528
8095
  }
8529
8096
  }
8530
8097
 
8531
- var entities$1 = [
8532
- "&aacute;",
8533
- "&abreve;",
8534
- "&ac;",
8535
- "&acd;",
8536
- "&ace;",
8537
- "&acirc;",
8538
- "&acute;",
8539
- "&acy;",
8540
- "&aelig;",
8541
- "&af;",
8542
- "&afr;",
8543
- "&agrave;",
8544
- "&alefsym;",
8545
- "&aleph;",
8546
- "&alpha;",
8547
- "&amacr;",
8548
- "&amalg;",
8549
- "&amp;",
8550
- "&and;",
8551
- "&andand;",
8552
- "&andd;",
8553
- "&andslope;",
8554
- "&andv;",
8555
- "&ang;",
8556
- "&ange;",
8557
- "&angle;",
8558
- "&angmsd;",
8559
- "&angmsdaa;",
8560
- "&angmsdab;",
8561
- "&angmsdac;",
8562
- "&angmsdad;",
8563
- "&angmsdae;",
8564
- "&angmsdaf;",
8565
- "&angmsdag;",
8566
- "&angmsdah;",
8567
- "&angrt;",
8568
- "&angrtvb;",
8569
- "&angrtvbd;",
8570
- "&angsph;",
8571
- "&angst;",
8572
- "&angzarr;",
8573
- "&aogon;",
8574
- "&aopf;",
8575
- "&ap;",
8576
- "&apacir;",
8577
- "&ape;",
8578
- "&apid;",
8579
- "&apos;",
8580
- "&applyfunction;",
8581
- "&approx;",
8582
- "&approxeq;",
8583
- "&aring;",
8584
- "&ascr;",
8585
- "&assign;",
8586
- "&ast;",
8587
- "&asymp;",
8588
- "&asympeq;",
8589
- "&atilde;",
8590
- "&auml;",
8591
- "&awconint;",
8592
- "&awint;",
8593
- "&backcong;",
8594
- "&backepsilon;",
8595
- "&backprime;",
8596
- "&backsim;",
8597
- "&backsimeq;",
8598
- "&backslash;",
8599
- "&barv;",
8600
- "&barvee;",
8601
- "&barwed;",
8602
- "&barwedge;",
8603
- "&bbrk;",
8604
- "&bbrktbrk;",
8605
- "&bcong;",
8606
- "&bcy;",
8607
- "&bdquo;",
8608
- "&becaus;",
8609
- "&because;",
8610
- "&bemptyv;",
8611
- "&bepsi;",
8612
- "&bernou;",
8613
- "&bernoullis;",
8614
- "&beta;",
8615
- "&beth;",
8616
- "&between;",
8617
- "&bfr;",
8618
- "&bigcap;",
8619
- "&bigcirc;",
8620
- "&bigcup;",
8621
- "&bigodot;",
8622
- "&bigoplus;",
8623
- "&bigotimes;",
8624
- "&bigsqcup;",
8625
- "&bigstar;",
8626
- "&bigtriangledown;",
8627
- "&bigtriangleup;",
8628
- "&biguplus;",
8629
- "&bigvee;",
8630
- "&bigwedge;",
8631
- "&bkarow;",
8632
- "&blacklozenge;",
8633
- "&blacksquare;",
8634
- "&blacktriangle;",
8635
- "&blacktriangledown;",
8636
- "&blacktriangleleft;",
8637
- "&blacktriangleright;",
8638
- "&blank;",
8639
- "&blk12;",
8640
- "&blk14;",
8641
- "&blk34;",
8642
- "&block;",
8643
- "&bne;",
8644
- "&bnequiv;",
8645
- "&bnot;",
8646
- "&bopf;",
8647
- "&bot;",
8648
- "&bottom;",
8649
- "&bowtie;",
8650
- "&boxbox;",
8651
- "&boxdl;",
8652
- "&boxdr;",
8653
- "&boxh;",
8654
- "&boxhd;",
8655
- "&boxhu;",
8656
- "&boxminus;",
8657
- "&boxplus;",
8658
- "&boxtimes;",
8659
- "&boxul;",
8660
- "&boxur;",
8661
- "&boxv;",
8662
- "&boxvh;",
8663
- "&boxvl;",
8664
- "&boxvr;",
8665
- "&bprime;",
8666
- "&breve;",
8667
- "&brvbar;",
8668
- "&bscr;",
8669
- "&bsemi;",
8670
- "&bsim;",
8671
- "&bsime;",
8672
- "&bsol;",
8673
- "&bsolb;",
8674
- "&bsolhsub;",
8675
- "&bull;",
8676
- "&bullet;",
8677
- "&bump;",
8678
- "&bumpe;",
8679
- "&bumpeq;",
8680
- "&cacute;",
8681
- "&cap;",
8682
- "&capand;",
8683
- "&capbrcup;",
8684
- "&capcap;",
8685
- "&capcup;",
8686
- "&capdot;",
8687
- "&capitaldifferentiald;",
8688
- "&caps;",
8689
- "&caret;",
8690
- "&caron;",
8691
- "&cayleys;",
8692
- "&ccaps;",
8693
- "&ccaron;",
8694
- "&ccedil;",
8695
- "&ccirc;",
8696
- "&cconint;",
8697
- "&ccups;",
8698
- "&ccupssm;",
8699
- "&cdot;",
8700
- "&cedil;",
8701
- "&cedilla;",
8702
- "&cemptyv;",
8703
- "&cent;",
8704
- "&centerdot;",
8705
- "&cfr;",
8706
- "&chcy;",
8707
- "&check;",
8708
- "&checkmark;",
8709
- "&chi;",
8710
- "&cir;",
8711
- "&circ;",
8712
- "&circeq;",
8713
- "&circlearrowleft;",
8714
- "&circlearrowright;",
8715
- "&circledast;",
8716
- "&circledcirc;",
8717
- "&circleddash;",
8718
- "&circledot;",
8719
- "&circledr;",
8720
- "&circleds;",
8721
- "&circleminus;",
8722
- "&circleplus;",
8723
- "&circletimes;",
8724
- "&cire;",
8725
- "&cirfnint;",
8726
- "&cirmid;",
8727
- "&cirscir;",
8728
- "&clockwisecontourintegral;",
8729
- "&closecurlydoublequote;",
8730
- "&closecurlyquote;",
8731
- "&clubs;",
8732
- "&clubsuit;",
8733
- "&colon;",
8734
- "&colone;",
8735
- "&coloneq;",
8736
- "&comma;",
8737
- "&commat;",
8738
- "&comp;",
8739
- "&compfn;",
8740
- "&complement;",
8741
- "&complexes;",
8742
- "&cong;",
8743
- "&congdot;",
8744
- "&congruent;",
8745
- "&conint;",
8746
- "&contourintegral;",
8747
- "&copf;",
8748
- "&coprod;",
8749
- "&coproduct;",
8750
- "&copy;",
8751
- "&copysr;",
8752
- "&counterclockwisecontourintegral;",
8753
- "&crarr;",
8754
- "&cross;",
8755
- "&cscr;",
8756
- "&csub;",
8757
- "&csube;",
8758
- "&csup;",
8759
- "&csupe;",
8760
- "&ctdot;",
8761
- "&cudarrl;",
8762
- "&cudarrr;",
8763
- "&cuepr;",
8764
- "&cuesc;",
8765
- "&cularr;",
8766
- "&cularrp;",
8767
- "&cup;",
8768
- "&cupbrcap;",
8769
- "&cupcap;",
8770
- "&cupcup;",
8771
- "&cupdot;",
8772
- "&cupor;",
8773
- "&cups;",
8774
- "&curarr;",
8775
- "&curarrm;",
8776
- "&curlyeqprec;",
8777
- "&curlyeqsucc;",
8778
- "&curlyvee;",
8779
- "&curlywedge;",
8780
- "&curren;",
8781
- "&curvearrowleft;",
8782
- "&curvearrowright;",
8783
- "&cuvee;",
8784
- "&cuwed;",
8785
- "&cwconint;",
8786
- "&cwint;",
8787
- "&cylcty;",
8788
- "&dagger;",
8789
- "&daleth;",
8790
- "&darr;",
8791
- "&dash;",
8792
- "&dashv;",
8793
- "&dbkarow;",
8794
- "&dblac;",
8795
- "&dcaron;",
8796
- "&dcy;",
8797
- "&dd;",
8798
- "&ddagger;",
8799
- "&ddarr;",
8800
- "&ddotrahd;",
8801
- "&ddotseq;",
8802
- "&deg;",
8803
- "&del;",
8804
- "&delta;",
8805
- "&demptyv;",
8806
- "&dfisht;",
8807
- "&dfr;",
8808
- "&dhar;",
8809
- "&dharl;",
8810
- "&dharr;",
8811
- "&diacriticalacute;",
8812
- "&diacriticaldot;",
8813
- "&diacriticaldoubleacute;",
8814
- "&diacriticalgrave;",
8815
- "&diacriticaltilde;",
8816
- "&diam;",
8817
- "&diamond;",
8818
- "&diamondsuit;",
8819
- "&diams;",
8820
- "&die;",
8821
- "&differentiald;",
8822
- "&digamma;",
8823
- "&disin;",
8824
- "&div;",
8825
- "&divide;",
8826
- "&divideontimes;",
8827
- "&divonx;",
8828
- "&djcy;",
8829
- "&dlcorn;",
8830
- "&dlcrop;",
8831
- "&dollar;",
8832
- "&dopf;",
8833
- "&dot;",
8834
- "&dotdot;",
8835
- "&doteq;",
8836
- "&doteqdot;",
8837
- "&dotequal;",
8838
- "&dotminus;",
8839
- "&dotplus;",
8840
- "&dotsquare;",
8841
- "&doublebarwedge;",
8842
- "&doublecontourintegral;",
8843
- "&doubledot;",
8844
- "&doubledownarrow;",
8845
- "&doubleleftarrow;",
8846
- "&doubleleftrightarrow;",
8847
- "&doublelefttee;",
8848
- "&doublelongleftarrow;",
8849
- "&doublelongleftrightarrow;",
8850
- "&doublelongrightarrow;",
8851
- "&doublerightarrow;",
8852
- "&doublerighttee;",
8853
- "&doubleuparrow;",
8854
- "&doubleupdownarrow;",
8855
- "&doubleverticalbar;",
8856
- "&downarrow;",
8857
- "&downarrowbar;",
8858
- "&downarrowuparrow;",
8859
- "&downbreve;",
8860
- "&downdownarrows;",
8861
- "&downharpoonleft;",
8862
- "&downharpoonright;",
8863
- "&downleftrightvector;",
8864
- "&downleftteevector;",
8865
- "&downleftvector;",
8866
- "&downleftvectorbar;",
8867
- "&downrightteevector;",
8868
- "&downrightvector;",
8869
- "&downrightvectorbar;",
8870
- "&downtee;",
8871
- "&downteearrow;",
8872
- "&drbkarow;",
8873
- "&drcorn;",
8874
- "&drcrop;",
8875
- "&dscr;",
8876
- "&dscy;",
8877
- "&dsol;",
8878
- "&dstrok;",
8879
- "&dtdot;",
8880
- "&dtri;",
8881
- "&dtrif;",
8882
- "&duarr;",
8883
- "&duhar;",
8884
- "&dwangle;",
8885
- "&dzcy;",
8886
- "&dzigrarr;",
8887
- "&eacute;",
8888
- "&easter;",
8889
- "&ecaron;",
8890
- "&ecir;",
8891
- "&ecirc;",
8892
- "&ecolon;",
8893
- "&ecy;",
8894
- "&eddot;",
8895
- "&edot;",
8896
- "&ee;",
8897
- "&efdot;",
8898
- "&efr;",
8899
- "&eg;",
8900
- "&egrave;",
8901
- "&egs;",
8902
- "&egsdot;",
8903
- "&el;",
8904
- "&element;",
8905
- "&elinters;",
8906
- "&ell;",
8907
- "&els;",
8908
- "&elsdot;",
8909
- "&emacr;",
8910
- "&empty;",
8911
- "&emptyset;",
8912
- "&emptysmallsquare;",
8913
- "&emptyv;",
8914
- "&emptyverysmallsquare;",
8915
- "&emsp13;",
8916
- "&emsp14;",
8917
- "&emsp;",
8918
- "&eng;",
8919
- "&ensp;",
8920
- "&eogon;",
8921
- "&eopf;",
8922
- "&epar;",
8923
- "&eparsl;",
8924
- "&eplus;",
8925
- "&epsi;",
8926
- "&epsilon;",
8927
- "&epsiv;",
8928
- "&eqcirc;",
8929
- "&eqcolon;",
8930
- "&eqsim;",
8931
- "&eqslantgtr;",
8932
- "&eqslantless;",
8933
- "&equal;",
8934
- "&equals;",
8935
- "&equaltilde;",
8936
- "&equest;",
8937
- "&equilibrium;",
8938
- "&equiv;",
8939
- "&equivdd;",
8940
- "&eqvparsl;",
8941
- "&erarr;",
8942
- "&erdot;",
8943
- "&escr;",
8944
- "&esdot;",
8945
- "&esim;",
8946
- "&eta;",
8947
- "&eth;",
8948
- "&euml;",
8949
- "&euro;",
8950
- "&excl;",
8951
- "&exist;",
8952
- "&exists;",
8953
- "&expectation;",
8954
- "&exponentiale;",
8955
- "&fallingdotseq;",
8956
- "&fcy;",
8957
- "&female;",
8958
- "&ffilig;",
8959
- "&fflig;",
8960
- "&ffllig;",
8961
- "&ffr;",
8962
- "&filig;",
8963
- "&filledsmallsquare;",
8964
- "&filledverysmallsquare;",
8965
- "&fjlig;",
8966
- "&flat;",
8967
- "&fllig;",
8968
- "&fltns;",
8969
- "&fnof;",
8970
- "&fopf;",
8971
- "&forall;",
8972
- "&fork;",
8973
- "&forkv;",
8974
- "&fouriertrf;",
8975
- "&fpartint;",
8976
- "&frac12;",
8977
- "&frac13;",
8978
- "&frac14;",
8979
- "&frac15;",
8980
- "&frac16;",
8981
- "&frac18;",
8982
- "&frac23;",
8983
- "&frac25;",
8984
- "&frac34;",
8985
- "&frac35;",
8986
- "&frac38;",
8987
- "&frac45;",
8988
- "&frac56;",
8989
- "&frac58;",
8990
- "&frac78;",
8991
- "&frasl;",
8992
- "&frown;",
8993
- "&fscr;",
8994
- "&gacute;",
8995
- "&gamma;",
8996
- "&gammad;",
8997
- "&gap;",
8998
- "&gbreve;",
8999
- "&gcedil;",
9000
- "&gcirc;",
9001
- "&gcy;",
9002
- "&gdot;",
9003
- "&ge;",
9004
- "&gel;",
9005
- "&geq;",
9006
- "&geqq;",
9007
- "&geqslant;",
9008
- "&ges;",
9009
- "&gescc;",
9010
- "&gesdot;",
9011
- "&gesdoto;",
9012
- "&gesdotol;",
9013
- "&gesl;",
9014
- "&gesles;",
9015
- "&gfr;",
9016
- "&gg;",
9017
- "&ggg;",
9018
- "&gimel;",
9019
- "&gjcy;",
9020
- "&gl;",
9021
- "&gla;",
9022
- "&gle;",
9023
- "&glj;",
9024
- "&gnap;",
9025
- "&gnapprox;",
9026
- "&gne;",
9027
- "&gneq;",
9028
- "&gneqq;",
9029
- "&gnsim;",
9030
- "&gopf;",
9031
- "&grave;",
9032
- "&greaterequal;",
9033
- "&greaterequalless;",
9034
- "&greaterfullequal;",
9035
- "&greatergreater;",
9036
- "&greaterless;",
9037
- "&greaterslantequal;",
9038
- "&greatertilde;",
9039
- "&gscr;",
9040
- "&gsim;",
9041
- "&gsime;",
9042
- "&gsiml;",
9043
- "&gt;",
9044
- "&gtcc;",
9045
- "&gtcir;",
9046
- "&gtdot;",
9047
- "&gtlpar;",
9048
- "&gtquest;",
9049
- "&gtrapprox;",
9050
- "&gtrarr;",
9051
- "&gtrdot;",
9052
- "&gtreqless;",
9053
- "&gtreqqless;",
9054
- "&gtrless;",
9055
- "&gtrsim;",
9056
- "&gvertneqq;",
9057
- "&gvne;",
9058
- "&hacek;",
9059
- "&hairsp;",
9060
- "&half;",
9061
- "&hamilt;",
9062
- "&hardcy;",
9063
- "&harr;",
9064
- "&harrcir;",
9065
- "&harrw;",
9066
- "&hat;",
9067
- "&hbar;",
9068
- "&hcirc;",
9069
- "&hearts;",
9070
- "&heartsuit;",
9071
- "&hellip;",
9072
- "&hercon;",
9073
- "&hfr;",
9074
- "&hilbertspace;",
9075
- "&hksearow;",
9076
- "&hkswarow;",
9077
- "&hoarr;",
9078
- "&homtht;",
9079
- "&hookleftarrow;",
9080
- "&hookrightarrow;",
9081
- "&hopf;",
9082
- "&horbar;",
9083
- "&horizontalline;",
9084
- "&hscr;",
9085
- "&hslash;",
9086
- "&hstrok;",
9087
- "&humpdownhump;",
9088
- "&humpequal;",
9089
- "&hybull;",
9090
- "&hyphen;",
9091
- "&iacute;",
9092
- "&ic;",
9093
- "&icirc;",
9094
- "&icy;",
9095
- "&idot;",
9096
- "&iecy;",
9097
- "&iexcl;",
9098
- "&iff;",
9099
- "&ifr;",
9100
- "&igrave;",
9101
- "&ii;",
9102
- "&iiiint;",
9103
- "&iiint;",
9104
- "&iinfin;",
9105
- "&iiota;",
9106
- "&ijlig;",
9107
- "&im;",
9108
- "&imacr;",
9109
- "&image;",
9110
- "&imaginaryi;",
9111
- "&imagline;",
9112
- "&imagpart;",
9113
- "&imath;",
9114
- "&imof;",
9115
- "&imped;",
9116
- "&implies;",
9117
- "&in;",
9118
- "&incare;",
9119
- "&infin;",
9120
- "&infintie;",
9121
- "&inodot;",
9122
- "&int;",
9123
- "&intcal;",
9124
- "&integers;",
9125
- "&integral;",
9126
- "&intercal;",
9127
- "&intersection;",
9128
- "&intlarhk;",
9129
- "&intprod;",
9130
- "&invisiblecomma;",
9131
- "&invisibletimes;",
9132
- "&iocy;",
9133
- "&iogon;",
9134
- "&iopf;",
9135
- "&iota;",
9136
- "&iprod;",
9137
- "&iquest;",
9138
- "&iscr;",
9139
- "&isin;",
9140
- "&isindot;",
9141
- "&isine;",
9142
- "&isins;",
9143
- "&isinsv;",
9144
- "&isinv;",
9145
- "&it;",
9146
- "&itilde;",
9147
- "&iukcy;",
9148
- "&iuml;",
9149
- "&jcirc;",
9150
- "&jcy;",
9151
- "&jfr;",
9152
- "&jmath;",
9153
- "&jopf;",
9154
- "&jscr;",
9155
- "&jsercy;",
9156
- "&jukcy;",
9157
- "&kappa;",
9158
- "&kappav;",
9159
- "&kcedil;",
9160
- "&kcy;",
9161
- "&kfr;",
9162
- "&kgreen;",
9163
- "&khcy;",
9164
- "&kjcy;",
9165
- "&kopf;",
9166
- "&kscr;",
9167
- "&laarr;",
9168
- "&lacute;",
9169
- "&laemptyv;",
9170
- "&lagran;",
9171
- "&lambda;",
9172
- "&lang;",
9173
- "&langd;",
9174
- "&langle;",
9175
- "&lap;",
9176
- "&laplacetrf;",
9177
- "&laquo;",
9178
- "&larr;",
9179
- "&larrb;",
9180
- "&larrbfs;",
9181
- "&larrfs;",
9182
- "&larrhk;",
9183
- "&larrlp;",
9184
- "&larrpl;",
9185
- "&larrsim;",
9186
- "&larrtl;",
9187
- "&lat;",
9188
- "&latail;",
9189
- "&late;",
9190
- "&lates;",
9191
- "&lbarr;",
9192
- "&lbbrk;",
9193
- "&lbrace;",
9194
- "&lbrack;",
9195
- "&lbrke;",
9196
- "&lbrksld;",
9197
- "&lbrkslu;",
9198
- "&lcaron;",
9199
- "&lcedil;",
9200
- "&lceil;",
9201
- "&lcub;",
9202
- "&lcy;",
9203
- "&ldca;",
9204
- "&ldquo;",
9205
- "&ldquor;",
9206
- "&ldrdhar;",
9207
- "&ldrushar;",
9208
- "&ldsh;",
9209
- "&le;",
9210
- "&leftanglebracket;",
9211
- "&leftarrow;",
9212
- "&leftarrowbar;",
9213
- "&leftarrowrightarrow;",
9214
- "&leftarrowtail;",
9215
- "&leftceiling;",
9216
- "&leftdoublebracket;",
9217
- "&leftdownteevector;",
9218
- "&leftdownvector;",
9219
- "&leftdownvectorbar;",
9220
- "&leftfloor;",
9221
- "&leftharpoondown;",
9222
- "&leftharpoonup;",
9223
- "&leftleftarrows;",
9224
- "&leftrightarrow;",
9225
- "&leftrightarrows;",
9226
- "&leftrightharpoons;",
9227
- "&leftrightsquigarrow;",
9228
- "&leftrightvector;",
9229
- "&lefttee;",
9230
- "&leftteearrow;",
9231
- "&leftteevector;",
9232
- "&leftthreetimes;",
9233
- "&lefttriangle;",
9234
- "&lefttrianglebar;",
9235
- "&lefttriangleequal;",
9236
- "&leftupdownvector;",
9237
- "&leftupteevector;",
9238
- "&leftupvector;",
9239
- "&leftupvectorbar;",
9240
- "&leftvector;",
9241
- "&leftvectorbar;",
9242
- "&leg;",
9243
- "&leq;",
9244
- "&leqq;",
9245
- "&leqslant;",
9246
- "&les;",
9247
- "&lescc;",
9248
- "&lesdot;",
9249
- "&lesdoto;",
9250
- "&lesdotor;",
9251
- "&lesg;",
9252
- "&lesges;",
9253
- "&lessapprox;",
9254
- "&lessdot;",
9255
- "&lesseqgtr;",
9256
- "&lesseqqgtr;",
9257
- "&lessequalgreater;",
9258
- "&lessfullequal;",
9259
- "&lessgreater;",
9260
- "&lessgtr;",
9261
- "&lessless;",
9262
- "&lesssim;",
9263
- "&lessslantequal;",
9264
- "&lesstilde;",
9265
- "&lfisht;",
9266
- "&lfloor;",
9267
- "&lfr;",
9268
- "&lg;",
9269
- "&lge;",
9270
- "&lhar;",
9271
- "&lhard;",
9272
- "&lharu;",
9273
- "&lharul;",
9274
- "&lhblk;",
9275
- "&ljcy;",
9276
- "&ll;",
9277
- "&llarr;",
9278
- "&llcorner;",
9279
- "&lleftarrow;",
9280
- "&llhard;",
9281
- "&lltri;",
9282
- "&lmidot;",
9283
- "&lmoust;",
9284
- "&lmoustache;",
9285
- "&lnap;",
9286
- "&lnapprox;",
9287
- "&lne;",
9288
- "&lneq;",
9289
- "&lneqq;",
9290
- "&lnsim;",
9291
- "&loang;",
9292
- "&loarr;",
9293
- "&lobrk;",
9294
- "&longleftarrow;",
9295
- "&longleftrightarrow;",
9296
- "&longmapsto;",
9297
- "&longrightarrow;",
9298
- "&looparrowleft;",
9299
- "&looparrowright;",
9300
- "&lopar;",
9301
- "&lopf;",
9302
- "&loplus;",
9303
- "&lotimes;",
9304
- "&lowast;",
9305
- "&lowbar;",
9306
- "&lowerleftarrow;",
9307
- "&lowerrightarrow;",
9308
- "&loz;",
9309
- "&lozenge;",
9310
- "&lozf;",
9311
- "&lpar;",
9312
- "&lparlt;",
9313
- "&lrarr;",
9314
- "&lrcorner;",
9315
- "&lrhar;",
9316
- "&lrhard;",
9317
- "&lrm;",
9318
- "&lrtri;",
9319
- "&lsaquo;",
9320
- "&lscr;",
9321
- "&lsh;",
9322
- "&lsim;",
9323
- "&lsime;",
9324
- "&lsimg;",
9325
- "&lsqb;",
9326
- "&lsquo;",
9327
- "&lsquor;",
9328
- "&lstrok;",
9329
- "&lt;",
9330
- "&ltcc;",
9331
- "&ltcir;",
9332
- "&ltdot;",
9333
- "&lthree;",
9334
- "&ltimes;",
9335
- "&ltlarr;",
9336
- "&ltquest;",
9337
- "&ltri;",
9338
- "&ltrie;",
9339
- "&ltrif;",
9340
- "&ltrpar;",
9341
- "&lurdshar;",
9342
- "&luruhar;",
9343
- "&lvertneqq;",
9344
- "&lvne;",
9345
- "&macr;",
9346
- "&male;",
9347
- "&malt;",
9348
- "&maltese;",
9349
- "&map;",
9350
- "&mapsto;",
9351
- "&mapstodown;",
9352
- "&mapstoleft;",
9353
- "&mapstoup;",
9354
- "&marker;",
9355
- "&mcomma;",
9356
- "&mcy;",
9357
- "&mdash;",
9358
- "&mddot;",
9359
- "&measuredangle;",
9360
- "&mediumspace;",
9361
- "&mellintrf;",
9362
- "&mfr;",
9363
- "&mho;",
9364
- "&micro;",
9365
- "&mid;",
9366
- "&midast;",
9367
- "&midcir;",
9368
- "&middot;",
9369
- "&minus;",
9370
- "&minusb;",
9371
- "&minusd;",
9372
- "&minusdu;",
9373
- "&minusplus;",
9374
- "&mlcp;",
9375
- "&mldr;",
9376
- "&mnplus;",
9377
- "&models;",
9378
- "&mopf;",
9379
- "&mp;",
9380
- "&mscr;",
9381
- "&mstpos;",
9382
- "&mu;",
9383
- "&multimap;",
9384
- "&mumap;",
9385
- "&nabla;",
9386
- "&nacute;",
9387
- "&nang;",
9388
- "&nap;",
9389
- "&nape;",
9390
- "&napid;",
9391
- "&napos;",
9392
- "&napprox;",
9393
- "&natur;",
9394
- "&natural;",
9395
- "&naturals;",
9396
- "&nbsp;",
9397
- "&nbump;",
9398
- "&nbumpe;",
9399
- "&ncap;",
9400
- "&ncaron;",
9401
- "&ncedil;",
9402
- "&ncong;",
9403
- "&ncongdot;",
9404
- "&ncup;",
9405
- "&ncy;",
9406
- "&ndash;",
9407
- "&ne;",
9408
- "&nearhk;",
9409
- "&nearr;",
9410
- "&nearrow;",
9411
- "&nedot;",
9412
- "&negativemediumspace;",
9413
- "&negativethickspace;",
9414
- "&negativethinspace;",
9415
- "&negativeverythinspace;",
9416
- "&nequiv;",
9417
- "&nesear;",
9418
- "&nesim;",
9419
- "&nestedgreatergreater;",
9420
- "&nestedlessless;",
9421
- "&newline;",
9422
- "&nexist;",
9423
- "&nexists;",
9424
- "&nfr;",
9425
- "&nge;",
9426
- "&ngeq;",
9427
- "&ngeqq;",
9428
- "&ngeqslant;",
9429
- "&nges;",
9430
- "&ngg;",
9431
- "&ngsim;",
9432
- "&ngt;",
9433
- "&ngtr;",
9434
- "&ngtv;",
9435
- "&nharr;",
9436
- "&nhpar;",
9437
- "&ni;",
9438
- "&nis;",
9439
- "&nisd;",
9440
- "&niv;",
9441
- "&njcy;",
9442
- "&nlarr;",
9443
- "&nldr;",
9444
- "&nle;",
9445
- "&nleftarrow;",
9446
- "&nleftrightarrow;",
9447
- "&nleq;",
9448
- "&nleqq;",
9449
- "&nleqslant;",
9450
- "&nles;",
9451
- "&nless;",
9452
- "&nll;",
9453
- "&nlsim;",
9454
- "&nlt;",
9455
- "&nltri;",
9456
- "&nltrie;",
9457
- "&nltv;",
9458
- "&nmid;",
9459
- "&nobreak;",
9460
- "&nonbreakingspace;",
9461
- "&nopf;",
9462
- "&not;",
9463
- "&notcongruent;",
9464
- "&notcupcap;",
9465
- "&notdoubleverticalbar;",
9466
- "&notelement;",
9467
- "&notequal;",
9468
- "&notequaltilde;",
9469
- "&notexists;",
9470
- "&notgreater;",
9471
- "&notgreaterequal;",
9472
- "&notgreaterfullequal;",
9473
- "&notgreatergreater;",
9474
- "&notgreaterless;",
9475
- "&notgreaterslantequal;",
9476
- "&notgreatertilde;",
9477
- "&nothumpdownhump;",
9478
- "&nothumpequal;",
9479
- "&notin;",
9480
- "&notindot;",
9481
- "&notine;",
9482
- "&notinva;",
9483
- "&notinvb;",
9484
- "&notinvc;",
9485
- "&notlefttriangle;",
9486
- "&notlefttrianglebar;",
9487
- "&notlefttriangleequal;",
9488
- "&notless;",
9489
- "&notlessequal;",
9490
- "&notlessgreater;",
9491
- "&notlessless;",
9492
- "&notlessslantequal;",
9493
- "&notlesstilde;",
9494
- "&notnestedgreatergreater;",
9495
- "&notnestedlessless;",
9496
- "&notni;",
9497
- "&notniva;",
9498
- "&notnivb;",
9499
- "&notnivc;",
9500
- "&notprecedes;",
9501
- "&notprecedesequal;",
9502
- "&notprecedesslantequal;",
9503
- "&notreverseelement;",
9504
- "&notrighttriangle;",
9505
- "&notrighttrianglebar;",
9506
- "&notrighttriangleequal;",
9507
- "&notsquaresubset;",
9508
- "&notsquaresubsetequal;",
9509
- "&notsquaresuperset;",
9510
- "&notsquaresupersetequal;",
9511
- "&notsubset;",
9512
- "&notsubsetequal;",
9513
- "&notsucceeds;",
9514
- "&notsucceedsequal;",
9515
- "&notsucceedsslantequal;",
9516
- "&notsucceedstilde;",
9517
- "&notsuperset;",
9518
- "&notsupersetequal;",
9519
- "&nottilde;",
9520
- "&nottildeequal;",
9521
- "&nottildefullequal;",
9522
- "&nottildetilde;",
9523
- "&notverticalbar;",
9524
- "&npar;",
9525
- "&nparallel;",
9526
- "&nparsl;",
9527
- "&npart;",
9528
- "&npolint;",
9529
- "&npr;",
9530
- "&nprcue;",
9531
- "&npre;",
9532
- "&nprec;",
9533
- "&npreceq;",
9534
- "&nrarr;",
9535
- "&nrarrc;",
9536
- "&nrarrw;",
9537
- "&nrightarrow;",
9538
- "&nrtri;",
9539
- "&nrtrie;",
9540
- "&nsc;",
9541
- "&nsccue;",
9542
- "&nsce;",
9543
- "&nscr;",
9544
- "&nshortmid;",
9545
- "&nshortparallel;",
9546
- "&nsim;",
9547
- "&nsime;",
9548
- "&nsimeq;",
9549
- "&nsmid;",
9550
- "&nspar;",
9551
- "&nsqsube;",
9552
- "&nsqsupe;",
9553
- "&nsub;",
9554
- "&nsube;",
9555
- "&nsubset;",
9556
- "&nsubseteq;",
9557
- "&nsubseteqq;",
9558
- "&nsucc;",
9559
- "&nsucceq;",
9560
- "&nsup;",
9561
- "&nsupe;",
9562
- "&nsupset;",
9563
- "&nsupseteq;",
9564
- "&nsupseteqq;",
9565
- "&ntgl;",
9566
- "&ntilde;",
9567
- "&ntlg;",
9568
- "&ntriangleleft;",
9569
- "&ntrianglelefteq;",
9570
- "&ntriangleright;",
9571
- "&ntrianglerighteq;",
9572
- "&nu;",
9573
- "&num;",
9574
- "&numero;",
9575
- "&numsp;",
9576
- "&nvap;",
9577
- "&nvdash;",
9578
- "&nvge;",
9579
- "&nvgt;",
9580
- "&nvharr;",
9581
- "&nvinfin;",
9582
- "&nvlarr;",
9583
- "&nvle;",
9584
- "&nvlt;",
9585
- "&nvltrie;",
9586
- "&nvrarr;",
9587
- "&nvrtrie;",
9588
- "&nvsim;",
9589
- "&nwarhk;",
9590
- "&nwarr;",
9591
- "&nwarrow;",
9592
- "&nwnear;",
9593
- "&oacute;",
9594
- "&oast;",
9595
- "&ocir;",
9596
- "&ocirc;",
9597
- "&ocy;",
9598
- "&odash;",
9599
- "&odblac;",
9600
- "&odiv;",
9601
- "&odot;",
9602
- "&odsold;",
9603
- "&oelig;",
9604
- "&ofcir;",
9605
- "&ofr;",
9606
- "&ogon;",
9607
- "&ograve;",
9608
- "&ogt;",
9609
- "&ohbar;",
9610
- "&ohm;",
9611
- "&oint;",
9612
- "&olarr;",
9613
- "&olcir;",
9614
- "&olcross;",
9615
- "&oline;",
9616
- "&olt;",
9617
- "&omacr;",
9618
- "&omega;",
9619
- "&omicron;",
9620
- "&omid;",
9621
- "&ominus;",
9622
- "&oopf;",
9623
- "&opar;",
9624
- "&opencurlydoublequote;",
9625
- "&opencurlyquote;",
9626
- "&operp;",
9627
- "&oplus;",
9628
- "&or;",
9629
- "&orarr;",
9630
- "&ord;",
9631
- "&order;",
9632
- "&orderof;",
9633
- "&ordf;",
9634
- "&ordm;",
9635
- "&origof;",
9636
- "&oror;",
9637
- "&orslope;",
9638
- "&orv;",
9639
- "&os;",
9640
- "&oscr;",
9641
- "&oslash;",
9642
- "&osol;",
9643
- "&otilde;",
9644
- "&otimes;",
9645
- "&otimesas;",
9646
- "&ouml;",
9647
- "&ovbar;",
9648
- "&overbar;",
9649
- "&overbrace;",
9650
- "&overbracket;",
9651
- "&overparenthesis;",
9652
- "&par;",
9653
- "&para;",
9654
- "&parallel;",
9655
- "&parsim;",
9656
- "&parsl;",
9657
- "&part;",
9658
- "&partiald;",
9659
- "&pcy;",
9660
- "&percnt;",
9661
- "&period;",
9662
- "&permil;",
9663
- "&perp;",
9664
- "&pertenk;",
9665
- "&pfr;",
9666
- "&phi;",
9667
- "&phiv;",
9668
- "&phmmat;",
9669
- "&phone;",
9670
- "&pi;",
9671
- "&pitchfork;",
9672
- "&piv;",
9673
- "&planck;",
9674
- "&planckh;",
9675
- "&plankv;",
9676
- "&plus;",
9677
- "&plusacir;",
9678
- "&plusb;",
9679
- "&pluscir;",
9680
- "&plusdo;",
9681
- "&plusdu;",
9682
- "&pluse;",
9683
- "&plusminus;",
9684
- "&plusmn;",
9685
- "&plussim;",
9686
- "&plustwo;",
9687
- "&pm;",
9688
- "&poincareplane;",
9689
- "&pointint;",
9690
- "&popf;",
9691
- "&pound;",
9692
- "&pr;",
9693
- "&prap;",
9694
- "&prcue;",
9695
- "&pre;",
9696
- "&prec;",
9697
- "&precapprox;",
9698
- "&preccurlyeq;",
9699
- "&precedes;",
9700
- "&precedesequal;",
9701
- "&precedesslantequal;",
9702
- "&precedestilde;",
9703
- "&preceq;",
9704
- "&precnapprox;",
9705
- "&precneqq;",
9706
- "&precnsim;",
9707
- "&precsim;",
9708
- "&prime;",
9709
- "&primes;",
9710
- "&prnap;",
9711
- "&prne;",
9712
- "&prnsim;",
9713
- "&prod;",
9714
- "&product;",
9715
- "&profalar;",
9716
- "&profline;",
9717
- "&profsurf;",
9718
- "&prop;",
9719
- "&proportion;",
9720
- "&proportional;",
9721
- "&propto;",
9722
- "&prsim;",
9723
- "&prurel;",
9724
- "&pscr;",
9725
- "&psi;",
9726
- "&puncsp;",
9727
- "&qfr;",
9728
- "&qint;",
9729
- "&qopf;",
9730
- "&qprime;",
9731
- "&qscr;",
9732
- "&quaternions;",
9733
- "&quatint;",
9734
- "&quest;",
9735
- "&questeq;",
9736
- "&quot;",
9737
- "&raarr;",
9738
- "&race;",
9739
- "&racute;",
9740
- "&radic;",
9741
- "&raemptyv;",
9742
- "&rang;",
9743
- "&rangd;",
9744
- "&range;",
9745
- "&rangle;",
9746
- "&raquo;",
9747
- "&rarr;",
9748
- "&rarrap;",
9749
- "&rarrb;",
9750
- "&rarrbfs;",
9751
- "&rarrc;",
9752
- "&rarrfs;",
9753
- "&rarrhk;",
9754
- "&rarrlp;",
9755
- "&rarrpl;",
9756
- "&rarrsim;",
9757
- "&rarrtl;",
9758
- "&rarrw;",
9759
- "&ratail;",
9760
- "&ratio;",
9761
- "&rationals;",
9762
- "&rbarr;",
9763
- "&rbbrk;",
9764
- "&rbrace;",
9765
- "&rbrack;",
9766
- "&rbrke;",
9767
- "&rbrksld;",
9768
- "&rbrkslu;",
9769
- "&rcaron;",
9770
- "&rcedil;",
9771
- "&rceil;",
9772
- "&rcub;",
9773
- "&rcy;",
9774
- "&rdca;",
9775
- "&rdldhar;",
9776
- "&rdquo;",
9777
- "&rdquor;",
9778
- "&rdsh;",
9779
- "&re;",
9780
- "&real;",
9781
- "&realine;",
9782
- "&realpart;",
9783
- "&reals;",
9784
- "&rect;",
9785
- "&reg;",
9786
- "&reverseelement;",
9787
- "&reverseequilibrium;",
9788
- "&reverseupequilibrium;",
9789
- "&rfisht;",
9790
- "&rfloor;",
9791
- "&rfr;",
9792
- "&rhar;",
9793
- "&rhard;",
9794
- "&rharu;",
9795
- "&rharul;",
9796
- "&rho;",
9797
- "&rhov;",
9798
- "&rightanglebracket;",
9799
- "&rightarrow;",
9800
- "&rightarrowbar;",
9801
- "&rightarrowleftarrow;",
9802
- "&rightarrowtail;",
9803
- "&rightceiling;",
9804
- "&rightdoublebracket;",
9805
- "&rightdownteevector;",
9806
- "&rightdownvector;",
9807
- "&rightdownvectorbar;",
9808
- "&rightfloor;",
9809
- "&rightharpoondown;",
9810
- "&rightharpoonup;",
9811
- "&rightleftarrows;",
9812
- "&rightleftharpoons;",
9813
- "&rightrightarrows;",
9814
- "&rightsquigarrow;",
9815
- "&righttee;",
9816
- "&rightteearrow;",
9817
- "&rightteevector;",
9818
- "&rightthreetimes;",
9819
- "&righttriangle;",
9820
- "&righttrianglebar;",
9821
- "&righttriangleequal;",
9822
- "&rightupdownvector;",
9823
- "&rightupteevector;",
9824
- "&rightupvector;",
9825
- "&rightupvectorbar;",
9826
- "&rightvector;",
9827
- "&rightvectorbar;",
9828
- "&ring;",
9829
- "&risingdotseq;",
9830
- "&rlarr;",
9831
- "&rlhar;",
9832
- "&rlm;",
9833
- "&rmoust;",
9834
- "&rmoustache;",
9835
- "&rnmid;",
9836
- "&roang;",
9837
- "&roarr;",
9838
- "&robrk;",
9839
- "&ropar;",
9840
- "&ropf;",
9841
- "&roplus;",
9842
- "&rotimes;",
9843
- "&roundimplies;",
9844
- "&rpar;",
9845
- "&rpargt;",
9846
- "&rppolint;",
9847
- "&rrarr;",
9848
- "&rrightarrow;",
9849
- "&rsaquo;",
9850
- "&rscr;",
9851
- "&rsh;",
9852
- "&rsqb;",
9853
- "&rsquo;",
9854
- "&rsquor;",
9855
- "&rthree;",
9856
- "&rtimes;",
9857
- "&rtri;",
9858
- "&rtrie;",
9859
- "&rtrif;",
9860
- "&rtriltri;",
9861
- "&ruledelayed;",
9862
- "&ruluhar;",
9863
- "&rx;",
9864
- "&sacute;",
9865
- "&sbquo;",
9866
- "&sc;",
9867
- "&scap;",
9868
- "&scaron;",
9869
- "&sccue;",
9870
- "&sce;",
9871
- "&scedil;",
9872
- "&scirc;",
9873
- "&scnap;",
9874
- "&scne;",
9875
- "&scnsim;",
9876
- "&scpolint;",
9877
- "&scsim;",
9878
- "&scy;",
9879
- "&sdot;",
9880
- "&sdotb;",
9881
- "&sdote;",
9882
- "&searhk;",
9883
- "&searr;",
9884
- "&searrow;",
9885
- "&sect;",
9886
- "&semi;",
9887
- "&seswar;",
9888
- "&setminus;",
9889
- "&setmn;",
9890
- "&sext;",
9891
- "&sfr;",
9892
- "&sfrown;",
9893
- "&sharp;",
9894
- "&shchcy;",
9895
- "&shcy;",
9896
- "&shortdownarrow;",
9897
- "&shortleftarrow;",
9898
- "&shortmid;",
9899
- "&shortparallel;",
9900
- "&shortrightarrow;",
9901
- "&shortuparrow;",
9902
- "&shy;",
9903
- "&sigma;",
9904
- "&sigmaf;",
9905
- "&sigmav;",
9906
- "&sim;",
9907
- "&simdot;",
9908
- "&sime;",
9909
- "&simeq;",
9910
- "&simg;",
9911
- "&simge;",
9912
- "&siml;",
9913
- "&simle;",
9914
- "&simne;",
9915
- "&simplus;",
9916
- "&simrarr;",
9917
- "&slarr;",
9918
- "&smallcircle;",
9919
- "&smallsetminus;",
9920
- "&smashp;",
9921
- "&smeparsl;",
9922
- "&smid;",
9923
- "&smile;",
9924
- "&smt;",
9925
- "&smte;",
9926
- "&smtes;",
9927
- "&softcy;",
9928
- "&sol;",
9929
- "&solb;",
9930
- "&solbar;",
9931
- "&sopf;",
9932
- "&spades;",
9933
- "&spadesuit;",
9934
- "&spar;",
9935
- "&sqcap;",
9936
- "&sqcaps;",
9937
- "&sqcup;",
9938
- "&sqcups;",
9939
- "&sqrt;",
9940
- "&sqsub;",
9941
- "&sqsube;",
9942
- "&sqsubset;",
9943
- "&sqsubseteq;",
9944
- "&sqsup;",
9945
- "&sqsupe;",
9946
- "&sqsupset;",
9947
- "&sqsupseteq;",
9948
- "&squ;",
9949
- "&square;",
9950
- "&squareintersection;",
9951
- "&squaresubset;",
9952
- "&squaresubsetequal;",
9953
- "&squaresuperset;",
9954
- "&squaresupersetequal;",
9955
- "&squareunion;",
9956
- "&squarf;",
9957
- "&squf;",
9958
- "&srarr;",
9959
- "&sscr;",
9960
- "&ssetmn;",
9961
- "&ssmile;",
9962
- "&sstarf;",
9963
- "&star;",
9964
- "&starf;",
9965
- "&straightepsilon;",
9966
- "&straightphi;",
9967
- "&strns;",
9968
- "&sub;",
9969
- "&subdot;",
9970
- "&sube;",
9971
- "&subedot;",
9972
- "&submult;",
9973
- "&subne;",
9974
- "&subplus;",
9975
- "&subrarr;",
9976
- "&subset;",
9977
- "&subseteq;",
9978
- "&subseteqq;",
9979
- "&subsetequal;",
9980
- "&subsetneq;",
9981
- "&subsetneqq;",
9982
- "&subsim;",
9983
- "&subsub;",
9984
- "&subsup;",
9985
- "&succ;",
9986
- "&succapprox;",
9987
- "&succcurlyeq;",
9988
- "&succeeds;",
9989
- "&succeedsequal;",
9990
- "&succeedsslantequal;",
9991
- "&succeedstilde;",
9992
- "&succeq;",
9993
- "&succnapprox;",
9994
- "&succneqq;",
9995
- "&succnsim;",
9996
- "&succsim;",
9997
- "&suchthat;",
9998
- "&sum;",
9999
- "&sung;",
10000
- "&sup1;",
10001
- "&sup2;",
10002
- "&sup3;",
10003
- "&sup;",
10004
- "&supdot;",
10005
- "&supdsub;",
10006
- "&supe;",
10007
- "&supedot;",
10008
- "&superset;",
10009
- "&supersetequal;",
10010
- "&suphsol;",
10011
- "&suphsub;",
10012
- "&suplarr;",
10013
- "&supmult;",
10014
- "&supne;",
10015
- "&supplus;",
10016
- "&supset;",
10017
- "&supseteq;",
10018
- "&supseteqq;",
10019
- "&supsetneq;",
10020
- "&supsetneqq;",
10021
- "&supsim;",
10022
- "&supsub;",
10023
- "&supsup;",
10024
- "&swarhk;",
10025
- "&swarr;",
10026
- "&swarrow;",
10027
- "&swnwar;",
10028
- "&szlig;",
10029
- "&tab;",
10030
- "&target;",
10031
- "&tau;",
10032
- "&tbrk;",
10033
- "&tcaron;",
10034
- "&tcedil;",
10035
- "&tcy;",
10036
- "&tdot;",
10037
- "&telrec;",
10038
- "&tfr;",
10039
- "&there4;",
10040
- "&therefore;",
10041
- "&theta;",
10042
- "&thetasym;",
10043
- "&thetav;",
10044
- "&thickapprox;",
10045
- "&thicksim;",
10046
- "&thickspace;",
10047
- "&thinsp;",
10048
- "&thinspace;",
10049
- "&thkap;",
10050
- "&thksim;",
10051
- "&thorn;",
10052
- "&tilde;",
10053
- "&tildeequal;",
10054
- "&tildefullequal;",
10055
- "&tildetilde;",
10056
- "&times;",
10057
- "&timesb;",
10058
- "&timesbar;",
10059
- "&timesd;",
10060
- "&tint;",
10061
- "&toea;",
10062
- "&top;",
10063
- "&topbot;",
10064
- "&topcir;",
10065
- "&topf;",
10066
- "&topfork;",
10067
- "&tosa;",
10068
- "&tprime;",
10069
- "&trade;",
10070
- "&triangle;",
10071
- "&triangledown;",
10072
- "&triangleleft;",
10073
- "&trianglelefteq;",
10074
- "&triangleq;",
10075
- "&triangleright;",
10076
- "&trianglerighteq;",
10077
- "&tridot;",
10078
- "&trie;",
10079
- "&triminus;",
10080
- "&tripledot;",
10081
- "&triplus;",
10082
- "&trisb;",
10083
- "&tritime;",
10084
- "&trpezium;",
10085
- "&tscr;",
10086
- "&tscy;",
10087
- "&tshcy;",
10088
- "&tstrok;",
10089
- "&twixt;",
10090
- "&twoheadleftarrow;",
10091
- "&twoheadrightarrow;",
10092
- "&uacute;",
10093
- "&uarr;",
10094
- "&uarrocir;",
10095
- "&ubrcy;",
10096
- "&ubreve;",
10097
- "&ucirc;",
10098
- "&ucy;",
10099
- "&udarr;",
10100
- "&udblac;",
10101
- "&udhar;",
10102
- "&ufisht;",
10103
- "&ufr;",
10104
- "&ugrave;",
10105
- "&uhar;",
10106
- "&uharl;",
10107
- "&uharr;",
10108
- "&uhblk;",
10109
- "&ulcorn;",
10110
- "&ulcorner;",
10111
- "&ulcrop;",
10112
- "&ultri;",
10113
- "&umacr;",
10114
- "&uml;",
10115
- "&underbar;",
10116
- "&underbrace;",
10117
- "&underbracket;",
10118
- "&underparenthesis;",
10119
- "&union;",
10120
- "&unionplus;",
10121
- "&uogon;",
10122
- "&uopf;",
10123
- "&uparrow;",
10124
- "&uparrowbar;",
10125
- "&uparrowdownarrow;",
10126
- "&updownarrow;",
10127
- "&upequilibrium;",
10128
- "&upharpoonleft;",
10129
- "&upharpoonright;",
10130
- "&uplus;",
10131
- "&upperleftarrow;",
10132
- "&upperrightarrow;",
10133
- "&upsi;",
10134
- "&upsih;",
10135
- "&upsilon;",
10136
- "&uptee;",
10137
- "&upteearrow;",
10138
- "&upuparrows;",
10139
- "&urcorn;",
10140
- "&urcorner;",
10141
- "&urcrop;",
10142
- "&uring;",
10143
- "&urtri;",
10144
- "&uscr;",
10145
- "&utdot;",
10146
- "&utilde;",
10147
- "&utri;",
10148
- "&utrif;",
10149
- "&uuarr;",
10150
- "&uuml;",
10151
- "&uwangle;",
10152
- "&vangrt;",
10153
- "&varepsilon;",
10154
- "&varkappa;",
10155
- "&varnothing;",
10156
- "&varphi;",
10157
- "&varpi;",
10158
- "&varpropto;",
10159
- "&varr;",
10160
- "&varrho;",
10161
- "&varsigma;",
10162
- "&varsubsetneq;",
10163
- "&varsubsetneqq;",
10164
- "&varsupsetneq;",
10165
- "&varsupsetneqq;",
10166
- "&vartheta;",
10167
- "&vartriangleleft;",
10168
- "&vartriangleright;",
10169
- "&vbar;",
10170
- "&vbarv;",
10171
- "&vcy;",
10172
- "&vdash;",
10173
- "&vdashl;",
10174
- "&vee;",
10175
- "&veebar;",
10176
- "&veeeq;",
10177
- "&vellip;",
10178
- "&verbar;",
10179
- "&vert;",
10180
- "&verticalbar;",
10181
- "&verticalline;",
10182
- "&verticalseparator;",
10183
- "&verticaltilde;",
10184
- "&verythinspace;",
10185
- "&vfr;",
10186
- "&vltri;",
10187
- "&vnsub;",
10188
- "&vnsup;",
10189
- "&vopf;",
10190
- "&vprop;",
10191
- "&vrtri;",
10192
- "&vscr;",
10193
- "&vsubne;",
10194
- "&vsupne;",
10195
- "&vvdash;",
10196
- "&vzigzag;",
10197
- "&wcirc;",
10198
- "&wedbar;",
10199
- "&wedge;",
10200
- "&wedgeq;",
10201
- "&weierp;",
10202
- "&wfr;",
10203
- "&wopf;",
10204
- "&wp;",
10205
- "&wr;",
10206
- "&wreath;",
10207
- "&wscr;",
10208
- "&xcap;",
10209
- "&xcirc;",
10210
- "&xcup;",
10211
- "&xdtri;",
10212
- "&xfr;",
10213
- "&xharr;",
10214
- "&xi;",
10215
- "&xlarr;",
10216
- "&xmap;",
10217
- "&xnis;",
10218
- "&xodot;",
10219
- "&xopf;",
10220
- "&xoplus;",
10221
- "&xotime;",
10222
- "&xrarr;",
10223
- "&xscr;",
10224
- "&xsqcup;",
10225
- "&xuplus;",
10226
- "&xutri;",
10227
- "&xvee;",
10228
- "&xwedge;",
10229
- "&yacute;",
10230
- "&yacy;",
10231
- "&ycirc;",
10232
- "&ycy;",
10233
- "&yen;",
10234
- "&yfr;",
10235
- "&yicy;",
10236
- "&yopf;",
10237
- "&yscr;",
10238
- "&yucy;",
10239
- "&yuml;",
10240
- "&zacute;",
10241
- "&zcaron;",
10242
- "&zcy;",
10243
- "&zdot;",
10244
- "&zeetrf;",
10245
- "&zerowidthspace;",
10246
- "&zeta;",
10247
- "&zfr;",
10248
- "&zhcy;",
10249
- "&zigrarr;",
10250
- "&zopf;",
10251
- "&zscr;",
10252
- "&zwj;",
10253
- "&zwnj;"
10254
- ];
10255
-
10256
- const regexp$1 = /&([a-z0-9]+|#x?[0-9a-f]+);/gi;
8098
+ const defaults$6 = {
8099
+ ignoreCase: false,
8100
+ requireSemicolon: true,
8101
+ };
8102
+ const regexp$1 = /&(?:[a-z0-9]+|#x?[0-9a-f]+)(;|[^a-z0-9]|$)/gi;
8103
+ const lowercaseEntities = entities$1.map((it) => it.toLowerCase());
8104
+ function isNumerical(entity) {
8105
+ return entity.startsWith("&#");
8106
+ }
8107
+ function getLocation(location, entity, match) {
8108
+ var _a;
8109
+ /* istanbul ignore next: never happens in practive */
8110
+ const index = (_a = match.index) !== null && _a !== void 0 ? _a : 0;
8111
+ return sliceLocation(location, index, index + entity.length);
8112
+ }
8113
+ function getDescription(context, options) {
8114
+ const url = "https://html.spec.whatwg.org/multipage/named-characters.html";
8115
+ let message;
8116
+ if (context) {
8117
+ if (context.terminated) {
8118
+ message = `Unrecognized character reference \`${context.entity}\`.`;
8119
+ }
8120
+ else {
8121
+ message = `Character reference \`${context.entity}\` must be terminated by a semicolon.`;
8122
+ }
8123
+ }
8124
+ else {
8125
+ message = `Unrecognized character reference.`;
8126
+ }
8127
+ return [
8128
+ message,
8129
+ `HTML5 defines a set of [valid character references](${url}) but this is not a valid one.`,
8130
+ "",
8131
+ "Ensure that:",
8132
+ "",
8133
+ "1. The character is one of the listed names.",
8134
+ ...(options.ignoreCase ? [] : ["1. The case is correct (names are case sensitive)."]),
8135
+ ...(options.requireSemicolon ? ["1. The name is terminated with a `;`."] : []),
8136
+ ].join("\n");
8137
+ }
10257
8138
  class UnknownCharReference extends Rule {
8139
+ constructor(options) {
8140
+ super({ ...defaults$6, ...options });
8141
+ }
8142
+ static schema() {
8143
+ return {
8144
+ ignoreCase: {
8145
+ type: "boolean",
8146
+ },
8147
+ requireSemicolon: {
8148
+ type: "boolean",
8149
+ },
8150
+ };
8151
+ }
10258
8152
  documentation(context) {
10259
8153
  return {
10260
- description: `HTML defines a set of valid character references but ${context || "this"} is not a valid one.`,
10261
- url: ruleDocumentationUrl("@/rules/unrecognized-char-ref.ts"),
8154
+ description: getDescription(context, this.options),
8155
+ url: "https://html-validate.org/rules/unrecognized-char-ref.html",
10262
8156
  };
10263
8157
  }
10264
8158
  setup() {
@@ -10269,7 +8163,9 @@ class UnknownCharReference extends Rule {
10269
8163
  if (child.nodeType !== NodeType.TEXT_NODE) {
10270
8164
  continue;
10271
8165
  }
10272
- this.findCharacterReferences(child.textContent, child.location);
8166
+ this.findCharacterReferences(node, child.textContent, child.location, {
8167
+ isAttribute: false,
8168
+ });
10273
8169
  }
10274
8170
  });
10275
8171
  this.on("attr", (event) => {
@@ -10277,25 +8173,72 @@ class UnknownCharReference extends Rule {
10277
8173
  if (!event.value) {
10278
8174
  return;
10279
8175
  }
10280
- this.findCharacterReferences(event.value.toString(), event.valueLocation);
8176
+ this.findCharacterReferences(event.target, event.value.toString(), event.valueLocation, {
8177
+ isAttribute: true,
8178
+ });
10281
8179
  });
10282
8180
  }
10283
- findCharacterReferences(text, location) {
8181
+ get entities() {
8182
+ if (this.options.ignoreCase) {
8183
+ return lowercaseEntities;
8184
+ }
8185
+ else {
8186
+ return entities$1;
8187
+ }
8188
+ }
8189
+ /* eslint-disable-next-line complexity */
8190
+ findCharacterReferences(node, text, location, { isAttribute }) {
8191
+ const { requireSemicolon } = this.options;
8192
+ const isQuerystring = isAttribute && text.includes("?");
8193
+ for (const { match, entity, raw, terminated } of this.getMatches(text)) {
8194
+ /* assume numeric entities are valid for now */
8195
+ if (isNumerical(entity)) {
8196
+ continue;
8197
+ }
8198
+ /* special case: when attributes use query parameters we skip checking
8199
+ * unterminated attributes */
8200
+ if (isQuerystring && !terminated) {
8201
+ continue;
8202
+ }
8203
+ const found = this.entities.includes(entity);
8204
+ /* ignore if this is a known character reference name */
8205
+ if (found && (terminated || !requireSemicolon)) {
8206
+ continue;
8207
+ }
8208
+ if (found && !terminated) {
8209
+ const entityLocation = getLocation(location, entity, match);
8210
+ const message = `Character reference "{{ entity }}" must be terminated by a semicolon`;
8211
+ const context = {
8212
+ entity: raw,
8213
+ terminated: false,
8214
+ };
8215
+ this.report(node, message, entityLocation, context);
8216
+ continue;
8217
+ }
8218
+ const entityLocation = getLocation(location, entity, match);
8219
+ const message = `Unrecognized character reference "{{ entity }}"`;
8220
+ const context = {
8221
+ entity: raw,
8222
+ terminated: true,
8223
+ };
8224
+ this.report(node, message, entityLocation, context);
8225
+ }
8226
+ }
8227
+ *getMatches(text) {
10284
8228
  let match;
10285
8229
  do {
10286
8230
  match = regexp$1.exec(text);
10287
8231
  if (match) {
10288
- const entity = match[0];
10289
- /* assume numeric entities are valid for now */
10290
- if (entity.startsWith("&#")) {
10291
- continue;
8232
+ const terminator = match[1]; // === ";" ? match[1] : "";
8233
+ const terminated = terminator === ";";
8234
+ const needSlice = terminator !== ";" && terminator.length > 0;
8235
+ const entity = needSlice ? match[0].slice(0, -1) : match[0];
8236
+ if (this.options.ignoreCase) {
8237
+ yield { match, entity: entity.toLowerCase(), raw: entity, terminated };
10292
8238
  }
10293
- /* ignore if this is a known character reference name */
10294
- if (entities$1.includes(entity)) {
10295
- continue;
8239
+ else {
8240
+ yield { match, entity, raw: entity, terminated };
10296
8241
  }
10297
- const entityLocation = sliceLocation(location, match.index, match.index + entity.length);
10298
- this.report(null, `Unrecognized character reference "${entity}"`, entityLocation, entity);
10299
8242
  }
10300
8243
  } while (match);
10301
8244
  }
@@ -10343,7 +8286,7 @@ class ValidID extends Rule {
10343
8286
  " - ID must not contain any whitespace characters",
10344
8287
  ...relaxedDescription,
10345
8288
  ].join("\n"),
10346
- url: ruleDocumentationUrl("@/rules/valid-id.ts"),
8289
+ url: "https://html-validate.org/rules/valid-id.html",
10347
8290
  };
10348
8291
  }
10349
8292
  setup() {
@@ -10418,7 +8361,7 @@ class Void extends Rule {
10418
8361
  documentation() {
10419
8362
  return {
10420
8363
  description: "HTML void elements cannot have any content and must not have an end tag.",
10421
- url: ruleDocumentationUrl("@/rules/void.ts"),
8364
+ url: "https://html-validate.org/rules/void.html",
10422
8365
  };
10423
8366
  }
10424
8367
  setup() {
@@ -10474,7 +8417,7 @@ class VoidContent extends Rule {
10474
8417
  documentation(tagName) {
10475
8418
  const doc = {
10476
8419
  description: "HTML void elements cannot have any content and must not have content or end tag.",
10477
- url: ruleDocumentationUrl("@/rules/void-content.ts"),
8420
+ url: "https://html-validate.org/rules/void-content.html",
10478
8421
  };
10479
8422
  if (tagName) {
10480
8423
  doc.description = `<${tagName}> is a void element and must not have content or end tag.`;
@@ -10521,7 +8464,7 @@ class VoidStyle extends Rule {
10521
8464
  documentation(context) {
10522
8465
  const doc = {
10523
8466
  description: "The current configuration requires a specific style for ending void elements.",
10524
- url: ruleDocumentationUrl("@/rules/void-style.ts"),
8467
+ url: "https://html-validate.org/rules/void-style.html",
10525
8468
  };
10526
8469
  if (context) {
10527
8470
  const [desc, end] = styleDescription(context.style);
@@ -10591,7 +8534,7 @@ class H30 extends Rule {
10591
8534
  documentation() {
10592
8535
  return {
10593
8536
  description: "WCAG 2.1 requires each `<a>` anchor link to have a text describing the purpose of the link using either plain text or an `<img>` with the `alt` attribute set.",
10594
- url: ruleDocumentationUrl("@/rules/wcag/h30.ts"),
8537
+ url: "https://html-validate.org/rules/wcag/h30.html",
10595
8538
  };
10596
8539
  }
10597
8540
  setup() {
@@ -10627,7 +8570,7 @@ class H32 extends Rule {
10627
8570
  documentation() {
10628
8571
  return {
10629
8572
  description: "WCAG 2.1 requires each `<form>` element to have at least one submit button.",
10630
- url: ruleDocumentationUrl("@/rules/wcag/h32.ts"),
8573
+ url: "https://html-validate.org/rules/wcag/h32.html",
10631
8574
  };
10632
8575
  }
10633
8576
  setup() {
@@ -10684,7 +8627,7 @@ class H36 extends Rule {
10684
8627
  documentation() {
10685
8628
  return {
10686
8629
  description: 'WCAG 2.1 requires all images used as submit buttons to have a textual description using the alt attribute. The alt text cannot be empty (`alt=""`).',
10687
- url: ruleDocumentationUrl("@/rules/wcag/h36.ts"),
8630
+ url: "https://html-validate.org/rules/wcag/h36.html",
10688
8631
  };
10689
8632
  }
10690
8633
  setup() {
@@ -10754,7 +8697,7 @@ class H37 extends Rule {
10754
8697
  documentation() {
10755
8698
  return {
10756
8699
  description: "Both HTML5 and WCAG 2.0 requires images to have a alternative text for each image.",
10757
- url: ruleDocumentationUrl("@/rules/wcag/h37.ts"),
8700
+ url: "https://html-validate.org/rules/wcag/h37.html",
10758
8701
  };
10759
8702
  }
10760
8703
  setup() {
@@ -10795,7 +8738,7 @@ class H67 extends Rule {
10795
8738
  documentation() {
10796
8739
  return {
10797
8740
  description: "A decorative image cannot have a title attribute. Either remove `title` or add a descriptive `alt` text.",
10798
- url: ruleDocumentationUrl("@/rules/wcag/h67.ts"),
8741
+ url: "https://html-validate.org/rules/wcag/h67.html",
10799
8742
  };
10800
8743
  }
10801
8744
  setup() {
@@ -10824,7 +8767,7 @@ class H71 extends Rule {
10824
8767
  documentation() {
10825
8768
  return {
10826
8769
  description: "H71: Providing a description for groups of form controls using fieldset and legend elements",
10827
- url: ruleDocumentationUrl("@/rules/wcag/h71.ts"),
8770
+ url: "https://html-validate.org/rules/wcag/h71.html",
10828
8771
  };
10829
8772
  }
10830
8773
  setup() {
@@ -10896,6 +8839,7 @@ const bundledRules = {
10896
8839
  "input-attributes": InputAttributes,
10897
8840
  "input-missing-label": InputMissingLabel,
10898
8841
  "long-title": LongTitle,
8842
+ "map-dup-name": MapDupName,
10899
8843
  "meta-refresh": MetaRefresh,
10900
8844
  "missing-doctype": MissingDoctype,
10901
8845
  "multiple-labeled-controls": MultipleLabeledControls,
@@ -11005,6 +8949,7 @@ const config$1 = {
11005
8949
  "empty-title": "error",
11006
8950
  "input-attributes": "error",
11007
8951
  "long-title": "error",
8952
+ "map-dup-name": "error",
11008
8953
  "meta-refresh": "error",
11009
8954
  "multiple-labeled-controls": "error",
11010
8955
  "no-autoplay": ["error", { include: ["audio", "video"] }],
@@ -11063,6 +9008,7 @@ const config = {
11063
9008
  "element-required-ancestor": "error",
11064
9009
  "element-required-attributes": "error",
11065
9010
  "element-required-content": "error",
9011
+ "map-dup-name": "error",
11066
9012
  "multiple-labeled-controls": "error",
11067
9013
  "no-deprecated-attr": "error",
11068
9014
  "no-dup-attr": "error",
@@ -11406,15 +9352,14 @@ class Config {
11406
9352
  metaTable.loadFromObject(entry);
11407
9353
  continue;
11408
9354
  }
11409
- let filename;
11410
9355
  /* try searching builtin metadata */
11411
- filename = path.join(projectRoot, "elements", `${entry}.js`);
11412
- if (fs.existsSync(filename)) {
11413
- metaTable.loadFromFile(filename);
9356
+ const bundled = bundledElements[entry];
9357
+ if (bundled) {
9358
+ metaTable.loadFromObject(bundled);
11414
9359
  continue;
11415
9360
  }
11416
9361
  /* try as regular file */
11417
- filename = entry.replace("<rootDir>", this.rootDir);
9362
+ const filename = entry.replace("<rootDir>", this.rootDir);
11418
9363
  if (fs.existsSync(filename)) {
11419
9364
  metaTable.loadFromFile(filename);
11420
9365
  continue;
@@ -13148,6 +11093,23 @@ class HtmlValidate {
13148
11093
  }
13149
11094
  }
13150
11095
 
11096
+ /* generated file, changes will be overwritten */
11097
+ /** @public */
11098
+ const name = "html-validate";
11099
+ /** @public */
11100
+ const version = "7.9.0";
11101
+ /** @public */
11102
+ const bugs = "https://gitlab.com/html-validate/html-validate/issues/new";
11103
+
11104
+ /**
11105
+ * Helper function to assist IDE with completion and type-checking.
11106
+ *
11107
+ * @public
11108
+ */
11109
+ function definePlugin(plugin) {
11110
+ return plugin;
11111
+ }
11112
+
13151
11113
  const defaults$1 = {
13152
11114
  silent: false,
13153
11115
  version,
@@ -13573,17 +11535,10 @@ const availableFormatters = {
13573
11535
  stylish: formatter$1,
13574
11536
  text: formatter,
13575
11537
  };
13576
- /**
13577
- * Get formatter function by name.
13578
- *
13579
- * @internal
13580
- * @param name - Name of formatter.
13581
- * @returns Formatter function or null if it doesn't exist.
13582
- */
13583
11538
  function getFormatter(name) {
13584
11539
  var _a;
13585
11540
  return (_a = availableFormatters[name]) !== null && _a !== void 0 ? _a : null;
13586
11541
  }
13587
11542
 
13588
- export { Config as C, DynamicValue as D, EventHandler as E, FileSystemConfigLoader as F, HtmlValidate as H, MetaTable as M, NodeClosed as N, Parser as P, Rule as R, Severity as S, TextNode as T, UserError as U, WrappedError as W, ConfigError as a, ConfigLoader as b, StaticConfigLoader as c, HtmlElement as d, SchemaValidationError as e, NestedError as f, MetaCopyableProperty as g, defineMetadata as h, classifyNodeText as i, TextClassification as j, Reporter as k, TemplateExtractor as l, metadataHelper as m, getFormatter as n, legacyRequire as o, presets as p, ensureError as q, ruleExists as r, configDataFromFile as s, compatibilityCheck as t, codeframe as u, version as v, name as w, bugs as x };
11543
+ export { Config as C, DynamicValue as D, EventHandler as E, FileSystemConfigLoader as F, HtmlValidate as H, MetaTable as M, NodeClosed as N, Parser as P, Rule as R, Severity as S, TextNode as T, UserError as U, WrappedError as W, ConfigError as a, ConfigLoader as b, StaticConfigLoader as c, HtmlElement as d, SchemaValidationError as e, NestedError as f, MetaCopyableProperty as g, Reporter as h, TemplateExtractor as i, definePlugin as j, getFormatter as k, legacyRequire as l, ensureError as m, configDataFromFile as n, compatibilityCheck as o, presets as p, codeframe as q, ruleExists as r, sliceLocation as s, isTextNode as t, isElementNode as u, version as v, generateIdSelector as w, name as x, bugs as y };
13589
11544
  //# sourceMappingURL=core.js.map