betty.sphinx.extension.replacements module - Betty 0.4.0a3 documentation

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# betty.sphinx.extension.replacements module

Provide a Sphinx plugin to apply string replacements to source code.

betty.sphinx.extension.replacements.render_replacements(app: sphinx.application.Sphinx, docname: str, source: list[str]) → None

  Handle Sphinx’s source-read event to perform string replacements.

  Parameters:

    - app (`sphinx.application.Sphinx`)

    - docname (`str`)

    - source (`list`[`str`])

  Return type:

    `None`

betty.sphinx.extension.replacements.setup(app: sphinx.application.Sphinx) → None

  Implement Sphinx’s extension setup.

  Parameters:

    app (`sphinx.application.Sphinx`)

  Return type:

    `None`