Visitar URL original
Lack of a blank line after `.. impl-detail::` · Issue #97607 · python/cpython · GitHub
Skip to content

Lack of a blank line after .. impl-detail:: #97607

Description

@StevenHsuYL

Documentation

This issue is made for translation work of documentation.

The issue is that if a blank line was absent after .. impl-detail::, the Sphinx would not build the paragraph after this line during HTML file generation for zh-tw translation.
I found this issue in three .rst files:

Doc/library/queue.rst
Doc/library/readline.rst
Doc/howto/isolating-extensions.rst

A blank line after .. impl-detail:: is suggested in those places for a complete building of corresponding translation pages.
Thanks!

Linked PRs

Activity

  1. changed the title [-]Lack of blank line after `.. impl-detail::`[/-] [+]Lack of a blank line after `.. impl-detail::`[/+] on Sep 28, 2022
  2. added a commit that references this issue on Sep 29, 2022
    00e5bcc
  3. CAM-Gerlach commented on Sep 29, 2022

    @CAM-Gerlach
    Member

    To make a long story short, after a lot of digging and investigation, I've uncovered, tested and implemented in #97652 a fix to the underlying bug here—the custom impl-detail directive is configured to consume text in the same paragraph (either with no or one line break after the directive start ::) as an optional argument, rather than just taking no arguments and simply treating it as first content paragraph by default, as the built-in Docutils/Sphinx directives that behave similarly (e.g. the various admonitions) do. This results in it missing the evidently key metadata (e.g. raw source, file and line number) in the parsed doctree nodes, that in turn breaks the translation code that requires this metadata.

    Implementing the latter ensures translations work correctly for all three cases (0, 1 or 2 line breaks before directive content) anywhere the directive is used, now and in the future, makes the behavior consistent with the builtin directives, and substantially simplifies the directive code and logic, while not modifying the non-translated HTML output. See #97652 for the fix.

  4. added a commit that references this issue on Oct 2, 2022
  5. added a commit that references this issue on Oct 2, 2022
  6. added 3 commits that reference this issue on Oct 2, 2022
  7. added a commit that references this issue on Oct 2, 2022
  8. added a commit that references this issue on Oct 3, 2022
  9. added a commit that references this issue on Oct 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions