Merged
Conversation
…ly renders the modern release bodies. Recent releases (v2.1.5 onwards) embed `<details><summary>` snippet blocks containing fenced Python code, and the previous m2r2 (markdown -> RST) pipeline pasted those code fences into `.. raw:: html` directives unchanged, so Sphinx surfaced literal backticks instead of syntax-highlighted snippets and re-declared the `:raw-html-m2r:` role on every release. The script now converts each release body to HTML via the `markdown` package (with `fenced_code`, `tables`, `attr_list`, and `md_in_html` extensions), strips the trailing `by @user in PR_URL` attribution while keeping the link, demotes Markdown ATX headings by one level so the page H1 still owns the top of the hierarchy, and emits a single `.. raw:: html` block per release wrapped in `div.uplt-whats-new-release-body` for styling. The `[bot]` suffix on `@dependabot[bot]` / `@pre-commit-ci[bot]` is now part of the attribution regex. Companion CSS rules in `docs/_static/custom.css` give the wrapper sane spacing for headings, the `<details>` affordance, code blocks, and inline images. The docs optional-dependency in pyproject.toml swaps `m2r2` for `markdown`. Adds `ultraplot/tests/test_docs_fetch_releases.py` exercising the raw-HTML wrapping, title formatting, three-space indent under the directive, the regression for code fences inside `<details>`, the empty-body and empty-API edge cases, and bot-account attribution stripping.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #695
<details> <summary>blocks with code cause escape behavior with the current pipeline to convert the release pages to show on the RTD docs. This replaces it with raw html paging.