reffy 14.5.1 → 14.5.2

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.5.1",
3
+ "version": "14.5.2",
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.6.1",
39
+ "puppeteer": "21.7.0",
40
40
  "semver": "^7.3.5",
41
- "web-specs": "2.75.1",
41
+ "web-specs": "2.76.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.2",
47
+ "respec": "34.3.0",
48
48
  "respec-hljs": "2.1.1",
49
- "rollup": "4.9.1",
49
+ "rollup": "4.9.5",
50
50
  "undici": "^6.1.0"
51
51
  },
52
52
  "overrides": {
@@ -138,6 +138,13 @@ function getHtmlProseDefinition(proseEl) {
138
138
  el.remove();
139
139
  }
140
140
 
141
+ // Remove comments
142
+ const commentsIterator = document.createNodeIterator(proseEl, NodeFilter.SHOW_COMMENT);
143
+ let comment;
144
+ while ((comment = commentsIterator.nextNode())) {
145
+ comment.remove();
146
+ }
147
+
141
148
  // Keep simple grouping content and text-level semantics elements
142
149
  const keepSelector = [
143
150
  'blockquote', 'dd', 'div', 'dl', 'dt', 'figcaption', 'figure', 'hr', 'li',
@@ -118,13 +118,10 @@ function extractRespecIdl() {
118
118
  .filter(el => !el.closest(informativeSelector))
119
119
  .map(el => el.cloneNode(true))
120
120
  .map(el => {
121
- const header = el.querySelector('.idlHeader');
122
- if (header) {
123
- header.remove();
124
- }
125
- const tests = el.querySelector('details.respec-tests-details');
126
- if (tests) {
127
- tests.remove();
121
+ for (const ignore of el.querySelectorAll([
122
+ 'aside', '.idlHeader', 'details.respec-tests-details',
123
+ ].join(','))) {
124
+ ignore.remove();
128
125
  }
129
126
  return el;
130
127
  })