Skip to content

Trim leading whitespace characters along doctest flags#13164

Merged
AA-Turner merged 3 commits intosphinx-doc:masterfrom
m-aciek:trim-spaces-with-doctest-flags
Jan 4, 2025
Merged

Trim leading whitespace characters along doctest flags#13164
AA-Turner merged 3 commits intosphinx-doc:masterfrom
m-aciek:trim-spaces-with-doctest-flags

Conversation

@m-aciek
Copy link
Contributor

@m-aciek m-aciek commented Dec 4, 2024

Subject: trim leading whitespaces along with doctest flags comments

Feature or Bugfix

  • Feature

Purpose

  • improve rendering of doctest blocks by removing trailing spaces from the output

Detail

  • extra trailing spaces can be seen in the code blocks output in a line where doctest comment is in the source code (note extra highlight after the dir(sys)
Zrzut ekranu 2024-12-5 o 00 45 19
  • it indirectly is causing sphinx-lint failures in a translated code blocks, as the sphinx-lint disallows trailing spaces

Related

@m-aciek m-aciek force-pushed the trim-spaces-with-doctest-flags branch from 7576637 to 39542bd Compare December 4, 2024 23:53
@m-aciek m-aciek force-pushed the trim-spaces-with-doctest-flags branch from 39542bd to 8ba1171 Compare December 4, 2024 23:54
@m-aciek m-aciek changed the title Trim leading spaces along doctest flags Trim leading whitespace characters along doctest flags Dec 4, 2024
@AA-Turner AA-Turner added this to the 8.2.0 milestone Jan 3, 2025
@AA-Turner AA-Turner merged commit ad0c343 into sphinx-doc:master Jan 4, 2025
@AA-Turner
Copy link
Member

Thanks!

A

@m-aciek m-aciek deleted the trim-spaces-with-doctest-flags branch January 24, 2025 09:45
@m-aciek m-aciek mentioned this pull request Jan 24, 2025
31 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants