html-validate 8.11.0 → 8.11.1

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.
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.40.6"
8
+ "packageVersion": "7.41.0"
9
9
  }
10
10
  ]
11
11
  }
package/dist/es/core.js CHANGED
@@ -1953,6 +1953,55 @@ function factory$1(name, context) {
1953
1953
  }
1954
1954
  }
1955
1955
 
1956
+ const escapedCodepoints = ["9", "a", "d"];
1957
+ function* splitSelectorElements(selector) {
1958
+ let begin = 0;
1959
+ let end = 0;
1960
+ function initialState(ch, p) {
1961
+ if (ch === "\\") {
1962
+ return 1 /* ESCAPED */;
1963
+ }
1964
+ if (ch === " ") {
1965
+ end = p;
1966
+ return 2 /* WHITESPACE */;
1967
+ }
1968
+ return 0 /* INITIAL */;
1969
+ }
1970
+ function escapedState(ch) {
1971
+ if (escapedCodepoints.includes(ch)) {
1972
+ return 1 /* ESCAPED */;
1973
+ }
1974
+ return 0 /* INITIAL */;
1975
+ }
1976
+ function* whitespaceState(ch, p) {
1977
+ if (ch === " ") {
1978
+ return 2 /* WHITESPACE */;
1979
+ }
1980
+ yield selector.slice(begin, end);
1981
+ begin = p;
1982
+ end = p;
1983
+ return 0 /* INITIAL */;
1984
+ }
1985
+ let state = 0 /* INITIAL */;
1986
+ for (let p = 0; p < selector.length; p++) {
1987
+ const ch = selector[p];
1988
+ switch (state) {
1989
+ case 0 /* INITIAL */:
1990
+ state = initialState(ch, p);
1991
+ break;
1992
+ case 1 /* ESCAPED */:
1993
+ state = escapedState(ch);
1994
+ break;
1995
+ case 2 /* WHITESPACE */:
1996
+ state = yield* whitespaceState(ch, p);
1997
+ break;
1998
+ }
1999
+ }
2000
+ if (begin !== selector.length) {
2001
+ yield selector.slice(begin);
2002
+ }
2003
+ }
2004
+
1956
2005
  function stripslashes(value) {
1957
2006
  return value.replace(/\\(.)/g, "$1");
1958
2007
  }
@@ -2152,13 +2201,8 @@ class Selector {
2152
2201
  }
2153
2202
  static parse(selector) {
2154
2203
  selector = selector.replace(/([+~>]) /g, "$1");
2155
- let begin = 0;
2156
- const delimiter = /((?:[^\\\u0039\u0061\u0064]) +|$)/g;
2157
- return Array.from(selector.matchAll(delimiter), (match) => {
2158
- const end = match.index + 1;
2159
- const part = unescapeCodepoint(selector.slice(begin, end));
2160
- begin = end + 1;
2161
- return new Pattern(part);
2204
+ return Array.from(splitSelectorElements(selector), (element) => {
2205
+ return new Pattern(unescapeCodepoint(element));
2162
2206
  });
2163
2207
  }
2164
2208
  static findCandidates(root, pattern) {
@@ -11860,7 +11904,7 @@ class HtmlValidate {
11860
11904
  }
11861
11905
 
11862
11906
  const name = "html-validate";
11863
- const version = "8.11.0";
11907
+ const version = "8.11.1";
11864
11908
  const bugs = "https://gitlab.com/html-validate/html-validate/issues/new";
11865
11909
 
11866
11910
  function definePlugin(plugin) {