sphinx/tests
Chris Sewell 134bd7f1fb
Add `collapsible` option to admonition directives (#12507)
This PR adds the `collapsible` and option to the core admonition type directives, which are propagated to the nodes, e.g.

```restructuredtext
.. admonition:: title
   :collapsible:

   content

.. note:: content
   :collapsible: closed
```

For the HTML5 writer, this replaces the outer `div` with a `details` tag, and the title `p`  with a `summary` tag (with an `open` attribute if set), e.g.

```html
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>hallo</p>
</div>
```

changes to

```html
<details class="admonition note" open="open">
<summary class="admonition-title">Note</summary>
<p>hallo</p>
</details>
```

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-01-29 18:06:57 +01:00
..
certs linkcheck: Specify subjectAltName in test self-signed certificate 2020-11-15 18:25:39 +01:00
js Bump `ENV_VERSION for _CurrentDocument` (#13246) 2025-01-16 17:53:40 +00:00
roots Add `collapsible` option to admonition directives (#12507) 2025-01-29 18:06:57 +01:00
test__cli Use `sphinx._cli.util.colour in sphinx.util.console` (#13241) 2025-01-16 16:57:28 +00:00
test_builders Add `collapsible` option to admonition directives (#12507) 2025-01-29 18:06:57 +01:00
test_config Move mypy test module exclusions to per-module ignores (#13265) 2025-01-26 19:41:15 +00:00
test_directives Move `sphinx.util re-exports to module __getattr__` 2025-01-14 01:01:52 +00:00
test_domains Improve the displayed signature for abstract methods (#13271) 2025-01-29 02:34:46 +00:00
test_environment Use `sphinx._cli.util.colour in sphinx.util.console` (#13241) 2025-01-16 16:57:28 +00:00
test_extensions Initial implementation of an `_Inventory` type (#13275) 2025-01-29 00:46:08 +00:00
test_intl Move mypy test module exclusions to per-module ignores (#13265) 2025-01-26 19:41:15 +00:00
test_markup Enable the entire D category in Ruff 2025-01-14 15:55:02 +00:00
test_pycode Enable the RUF031 lint in Ruff 2024-11-30 19:22:30 +00:00
test_theming Require the PEP 563 'annotations' future import 2024-11-22 21:54:26 +00:00
test_transforms Move mypy test module exclusions to per-module ignores (#13265) 2025-01-26 19:41:15 +00:00
test_util Initial implementation of an `_Inventory` type (#13275) 2025-01-29 00:46:08 +00:00
test_writers Require the PEP 563 'annotations' future import 2024-11-22 21:54:26 +00:00
__init__.py Make tests/ a Python package 2020-11-20 19:43:02 +01:00
conftest.py Consistently calculate the current file's directory 2024-11-03 17:28:02 +00:00
test_addnodes.py Bump Ruff to 0.5.1 (#12530) 2024-07-10 14:13:10 +01:00
test_application.py Use `sphinx._cli.util.colour in sphinx.util.console` (#13241) 2025-01-16 16:57:28 +00:00
test_command_line.py Remove unneeded runtime typing imports (#13233) 2025-01-12 01:04:14 +00:00
test_errors.py Require the PEP 563 'annotations' future import 2024-11-22 21:54:26 +00:00
test_events.py Bump Ruff to 0.9.0 2025-01-10 13:50:26 +00:00
test_highlighting.py Adapt tests for Pygments 2.19 2025-01-06 06:56:10 +00:00
test_project.py Require the PEP 563 'annotations' future import 2024-11-22 21:54:26 +00:00
test_quickstart.py Use `sphinx._cli.util.colour in sphinx.util.console` (#13241) 2025-01-16 16:57:28 +00:00
test_roles.py Require the PEP 563 'annotations' future import 2024-11-22 21:54:26 +00:00
test_search.py Move mypy test module exclusions to per-module ignores (#13265) 2025-01-26 19:41:15 +00:00
test_versioning.py Require the PEP 563 'annotations' future import 2024-11-22 21:54:26 +00:00
utils.py Enable the entire D category in Ruff 2025-01-14 15:55:02 +00:00