Skip to content

docs: Fix list & code block formatting on RtD#1257

Merged
RonnyPfannschmidt merged 8 commits intopypa:mainfrom
ferdnyc:patch-1
Jan 24, 2026
Merged

docs: Fix list & code block formatting on RtD#1257
RonnyPfannschmidt merged 8 commits intopypa:mainfrom
ferdnyc:patch-1

Conversation

@ferdnyc
Copy link
Contributor

@ferdnyc ferdnyc commented Jan 23, 2026

The docs' source formatting was triggering some quirks of RtD's MarkDown parser, things like:

  1. It doesn't recognize a new bulleted list following body text (or a parent list item) unless there's a blank line preceding the first list marker. Without the blank, the list items get run into the preceding paragraph/parent list.
  2. While it didn't necessarily affect formatting, each MarkDown heading is supposed to be followed by a blank line
  3. Fenced code blocks with a file="name" attribute weren't showing the "name" string as the filename. Changed to title="name", which is visible.

(EDIT: It seems this is a followup of sorts to #1250, which started the process of addressing these.)

======== SCREENSHOT: Before (1) ========

2, 3, and 4 are supposed to be a bulleted list child of list item 1. The ordered list should only have two items.

image

======== SCREENSHOT: Before (2) ========

Each of these paragraphs is supposed to be an introductory line of text followed by a 2-item bulleted list.

image

ferdnyc and others added 2 commits January 23, 2026 04:48
RtD's MarkDown parser doesn't recognize a new bulleted list following body text (or a parent list item) unless there's a blank line preceding the first list marker. Without the blank, the list items get run into the preceding paragraph/item text.

Add blank lines to ensure lists format as lists.
@ferdnyc
Copy link
Contributor Author

ferdnyc commented Jan 23, 2026

Wow, the Mercurial tests seem impossibly slow, the CI just grinds to a halt when it hits them.

@ferdnyc
Copy link
Contributor Author

ferdnyc commented Jan 23, 2026

Still not quite there, the run-together text is fixed but this is still wrong:

image

Perhaps the unordered child items are under-indented.

@ferdnyc
Copy link
Contributor Author

ferdnyc commented Jan 23, 2026

These other pages suffer from the same issue, though:

  • Usage
  • Configuration
  • Extending

All now addressed, I believe.

✔️ Everything looks right to me, now, on all four pages affected.

Add missing blank lines before/after fenced code blocks,
and before the first list marker in an (un)ordered list.
Filenames for a fenced code block applied with `file="name"`
weren't showing up on ReadTheDocs, but using `title="name"`
instead makes them visible.
Add a type indicator for syntax highlighting to several code
blocks which lacked one, and provide the name of the file
for which content is represented using a `title="name"` atttr.
Add blank lines preceding (un)ordered lists and fenced code blocks,
and following headings.
Add missing blank line which should precede (un)ordered lists,
and follow headings.
@ferdnyc ferdnyc changed the title docs(integrations): Fix list formatting on RtD docs: Fix list & code block formatting on RtD Jan 23, 2026
Copy link
Contributor

@RonnyPfannschmidt RonnyPfannschmidt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks 👍

@RonnyPfannschmidt RonnyPfannschmidt merged commit 86e8831 into pypa:main Jan 24, 2026
22 checks passed
@ferdnyc ferdnyc deleted the patch-1 branch January 24, 2026 10:26
RonnyPfannschmidt added a commit to RonnyPfannschmidt/setuptools_scm that referenced this pull request Jan 24, 2026
Merged PRs from main:
- pypa#1257: docs formatting fixes (blank lines, code blocks)
- pypa#1254: file finder GIT env var sanitization fix
- pypa#1256: CI windows gnupg path fix
- pypa#1251: bump actions/download-artifact to v7
- pypa#1250: fix list markup in docs
- pypa#1248: typo fixes (its → it's)
- pypa#1237: bump actions/checkout to v6

Conflict resolutions:
- python-tests.yml: kept monorepo sync command, updated to download-artifact v7
- README.md: kept clean monorepo README
- docs/config.md: kept vcs_versioning.Configuration reference
- _config.py, _pyproject_reading.py: applied typo fixes
- _git.py: merged imports and no_git_env fix
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