reffy 14.2.4 → 14.3.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reffy",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.3.0",
|
|
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.
|
|
39
|
+
"puppeteer": "21.5.2",
|
|
40
40
|
"semver": "^7.3.5",
|
|
41
|
-
"web-specs": "2.
|
|
41
|
+
"web-specs": "2.74.1",
|
|
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.
|
|
47
|
+
"respec": "34.2.2",
|
|
48
48
|
"respec-hljs": "2.1.1",
|
|
49
|
-
"rollup": "4.
|
|
49
|
+
"rollup": "4.5.2",
|
|
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.
|
|
37
|
-
const headingEl = n.
|
|
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),
|
|
@@ -7,7 +7,9 @@ export default function () {
|
|
|
7
7
|
// Ignore links from the "head" section, which either link to
|
|
8
8
|
// self, the GitHub repo, the implementation report, and other
|
|
9
9
|
// documents that don't need to appear in the list of references.
|
|
10
|
-
|
|
10
|
+
// Also ignore links in <del> elements that appear when specs
|
|
11
|
+
// carry their diff (e.g. W3C Recs with candidate corrections)
|
|
12
|
+
if (n.closest('.head, del')) return;
|
|
11
13
|
const pageUrl = n.href.split('#')[0];
|
|
12
14
|
if (!links[pageUrl]) {
|
|
13
15
|
links[pageUrl] = {anchors: new Set()};
|
|
@@ -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.
|
|
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.
|
|
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.
|
|
104
|
+
if (parentSection.root && parentSection.root.id) {
|
|
105
105
|
id = parentSection.root.id;
|
|
106
106
|
href = getAbsoluteUrl(parentSection.root, { singlePage });
|
|
107
107
|
}
|