Name Description Size Coverage
bzlink.py 2195 -
dark_mode.py Derive a dark colour scheme for sphinx-rtd-theme. sphinx-rtd-theme has no dark mode and no CSS custom properties to re-point: its stylesheet carries a couple of hundred colour literals. This reads the stylesheets the build has already written, maps every colour through OKLCh, and emits the result as a ``prefers-color-scheme: dark`` override, which keeps it in step with a theme bump. 13683 -
etp_matrix.py Sphinx extension to auto-generate ETP capability matrix during doc build. How it works: 1. This extension is loaded by Sphinx via docs/conf.py 2. On the 'builder-inited' event, it parses browser/app/profile/firefox.js to extract the `browser.contentblocking.features.strict` pref value 3. It parses modules/libpref/init/StaticPrefList.yaml for pref defaults 4. It generates etp-matrix/index.md in the build staging directory 5. Sphinx then renders it to HTML along with the rest of the docs The FEATURES list below maps feature codes (like "tp", "fp") to their corresponding prefs. Pref documentation and defaults are sourced from StaticPrefList.yaml. If a new feature code is added to firefox.js, it will appear as "UNKNOWN" in the output until FEATURES is updated. Output is published to: https://firefox-source-docs.mozilla.org/toolkit/components/antitracking/anti-tracking/etp-matrix/ 42567 -
mermaid_wrapped_option.py Fail the build on a mermaid block that opens with a wrapped option value. A mermaid diagram is drawn by the reader's browser, not by the build, so a block mermaid cannot parse publishes its own source and nothing in the build log says so. A block ends up that way when a directive option's value wraps: MyST ends the option block at the first line without a leading colon, so the continuation becomes the first line of the body and mermaid finds prose ahead of the diagram type. MyST keeps the continuation's indentation, and a diagram's opening line is not indented deeper than the lines below it, so a first line indented past a later one is the wrap. The diagram type itself is not checked: mermaid's keyword list lives in the JavaScript the reader's browser loads, and several keywords are ordinary words a caption can wrap onto ("graph", "info", "pie"). 3373 -
staging_paths.py Resolve document-relative paths without following the staging symlinks. The docs are built from a staging tree of symlinks pointing back into the source tree. ``BuildEnvironment.relfn2path`` normalises paths with ``Path.resolve()``, which follows those symlinks and lands outside the Sphinx source directory, so myst-parser reports every markdown link to another document as an unknown source document. Normalise the path textually instead, which keeps ``..`` handling but stays inside the staging tree. 1577 -