reffy 14.2.3 → 14.2.5

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reffy",
3
- "version": "14.2.3",
3
+ "version": "14.2.5",
4
4
  "description": "W3C/WHATWG spec dependencies exploration companion. Features a short set of tools to study spec references as well as WebIDL term definitions and references found in W3C specifications.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -36,17 +36,17 @@
36
36
  "ajv-formats": "2.1.1",
37
37
  "commander": "11.1.0",
38
38
  "fetch-filecache-for-crawling": "5.1.1",
39
- "puppeteer": "21.5.0",
39
+ "puppeteer": "21.5.1",
40
40
  "semver": "^7.3.5",
41
- "web-specs": "2.72.0",
41
+ "web-specs": "2.74.0",
42
42
  "webidl2": "24.4.1"
43
43
  },
44
44
  "devDependencies": {
45
45
  "chai": "4.3.10",
46
46
  "mocha": "10.2.0",
47
- "respec": "34.2.0",
47
+ "respec": "34.2.1",
48
48
  "respec-hljs": "2.1.1",
49
- "rollup": "4.3.0",
49
+ "rollup": "4.4.1",
50
50
  "undici": "^5.22.1"
51
51
  },
52
52
  "overrides": {
@@ -33,8 +33,8 @@ export default function (spec, idToHeading) {
33
33
  // headings not to create a mess in the outline). In practice, this only
34
34
  // really happens so far for WHATWG spec titles that (correctly) group the
35
35
  // title and subtitle headings in a <hgroup>.
36
- const idAttr = n.hasAttribute('id') ? 'id' : 'name';
37
- const headingEl = n.hasAttribute('id') ? n : n.parentNode;
36
+ const idAttr = n.id ? 'id' : 'name';
37
+ const headingEl = n.id ? n : n.parentNode;
38
38
  const href = getAbsoluteUrl(n, { singlePage, attribute: idAttr });
39
39
  const heading = idToHeading[href] || {
40
40
  id: n.getAttribute(idAttr),
@@ -81,7 +81,7 @@ export default function () {
81
81
  // Compute the absolute URL with fragment
82
82
  // (Note the crawler merges pages of a multi-page spec in the first page
83
83
  // to ease parsing logic, and we want to get back to the URL of the page)
84
- const idAttr = node.hasAttribute('id') ? 'id' : 'name';
84
+ const idAttr = node.id ? 'id' : 'name';
85
85
  const nodeid = getAbsoluteUrl(node, { singlePage, attribute: idAttr });
86
86
  let href = nodeid;
87
87
 
@@ -89,7 +89,7 @@ export default function () {
89
89
  let id;
90
90
 
91
91
  const heading = parentSection.heading;
92
- if (heading.hasAttribute('id')) {
92
+ if (heading.id) {
93
93
  id = heading.id;
94
94
  href = getAbsoluteUrl(heading, { singlePage });
95
95
  }
@@ -101,7 +101,7 @@ export default function () {
101
101
  }
102
102
  }
103
103
 
104
- if (parentSection.root && parentSection.root.hasAttribute('id')) {
104
+ if (parentSection.root && parentSection.root.id) {
105
105
  id = parentSection.root.id;
106
106
  href = getAbsoluteUrl(parentSection.root, { singlePage });
107
107
  }