8000 Add custom dfns/headings extraction logic for WebGL1 by tidoust · Pull Request #1894 · w3c/reffy · GitHub
[go: up one dir, main page]

Skip to content

Conversation

tidoust
Copy link
Member
@tidoust tidoust commented Jul 22, 2025

The HTML of the WebGL1 spec was mostly written by hand. It contains a few actual definitions that follow the definitions data model, but it also defines ~15+8 anchors for IDL attributes and methods that do not. These anchors are typically used in BCD.

A new pre-processing step was added to turn these anchors into proper <dfn> tags in WebGL1. As with SVG 2, that pre-processing step needs to parse the IDL to scope definitions properly (the prose is clunky, see inline comments in the code).

Similarly, a couple of headings have an additional anchor that is more human-friendly than 5.2 and that BCD typically targets. These IDs are now captured in the alternateIds array.

Via mdn/browser-compat-data#23958

The HTML of the WebGL1 spec was mostly written by hand. It contains a few
actual definitions that follow the definitions data model, but it also defines
~15+8 anchors for IDL attributes and methods that do not. These anchors are
typically used in BCD.

A new pre-processing step was added to turn these anchors into proper `<dfn>`
tags in WebGL1. As with SVG 2, that pre-processing step needs to parse the IDL
to scope definitions properly (the prose is clunky, see inline comments in the
code).

Similarly, a couple of headings have an additional anchor that is more
human-friendly than `5.2` and that BCD typically targets. These IDs are now
captured in the `alternateIds` array.
@tidoust tidoust requested a review from dontcallmedom July 22, 2025 14:54
@tidoust tidoust merged commit 63bc031 into main Jul 22, 2025
1 check passed
@tidoust tidoust deleted the webgl1 branch July 22, 2025 16:25
tidoust added a commit that referenced this pull request Jul 24, 2025
Features patched:
- [IDL] Add support for async_iterable (#1895)
- [dfns] Add custom dfns/headings extraction logic for WebGL1 (#1894)
- [CSS extracts] Handle headings, multi dfns, and `<boolean-expr[]>` (#1891)
- [CSS consolidation] Drop auto-expansion of at-rules syntaxes (#1897)

Dependencies bumped:
- Bump puppeteer from 24.12.0 to 24.15.0 (#1899, #1889)
- Bump webidl2 from 24.4.1 to 24.5.0 (#1898)
- Bump respec from 35.4.2 to 35.4.3 (#1893)
- Bump rollup from 4.45.0 to 4.45.1 (#1887)
- Bump undici from 7.11.0 to 7.12.0 (#1892)
- Bump web-specs from 3.57.0 to 3.58.0 (#1896)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0