reffy 11.0.5 → 11.0.6

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": "11.0.5",
3
+ "version": "11.0.6",
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",
@@ -37,7 +37,7 @@
37
37
  "ajv-formats": "2.1.1",
38
38
  "commander": "9.4.1",
39
39
  "fetch-filecache-for-crawling": "4.1.0",
40
- "puppeteer": "19.3.0",
40
+ "puppeteer": "19.4.0",
41
41
  "semver": "^7.3.5",
42
42
  "web-specs": "2.37.0",
43
43
  "webidl2": "24.2.2"
@@ -48,7 +48,7 @@
48
48
  "nock": "13.2.9",
49
49
  "respec": "32.4.0",
50
50
  "respec-hljs": "2.1.1",
51
- "rollup": "3.6.0"
51
+ "rollup": "3.7.0"
52
52
  },
53
53
  "scripts": {
54
54
  "test": "mocha --recursive tests/"
@@ -580,7 +580,7 @@ const extractTypedDfn = dfn => {
580
580
  const dfnType = dfn.getAttribute('data-dfn-type');
581
581
  const dfnFor = dfn.getAttribute('data-dfn-for');
582
582
  const parent = dfn.parentNode.cloneNode(true);
583
- const fnRegExp = /^([a-zA-Z_][a-zA-Z0-9_\-]+)\([^\)]+\)$/;
583
+ const fnRegExp = /^([:a-zA-Z_][:a-zA-Z0-9_\-]+)\([^\)]+\)$/;
584
584
 
585
585
  // Remove note references as in:
586
586
  // https://drafts.csswg.org/css-syntax-3/#the-anb-type
@@ -639,13 +639,8 @@ const extractTypedDfn = dfn => {
639
639
  if (!dd) {
640
640
  return;
641
641
  }
642
- let code = dd.querySelector('p > code, pre.prod');
642
+ const code = dd.querySelector('code.prod, pre.prod');
643
643
  if (code && !code.closest(informativeSelector)) {
644
- // The assumption here is that normative code in the <dd> element that
645
- // follows the definition is the production rule for the definition. This
646
- // is a rather bold assumption, which should probably be revisited
647
- // (unrelated code could appear in the prose and not have anything to do
648
- // with the definition's value)
649
644
  if (code.textContent.startsWith(`${text} = `) ||
650
645
  code.textContent.startsWith(`<${text}> = `)) {
651
646
  res = parseProductionRule(code.textContent, { pureSyntax: true });