Skip to content

A config option to enable substitutions in code and code blocks #992

Open
@neongreen-sc

Description

@neongreen-sc

Describe the feature you'd like to request

Right now, using substitutions in inline code / code blocks is rather cumbersome.

For inline code, you have to write smth like:

Instance {{ '`' + prod_instance + '`' }} is very important.

For code blocks, there's no good solution other than https://github.com/adamtheturtle/sphinx-substitution-extensions.

Describe the solution you'd like

For substitution-heavy documents, a config option like "enable_substitutions_in_code" would be very helpful. Authors can always configure substitution delimeters so that they don't clash with normal code.

Describe alternatives you've considered

  • Use block/inline attrs to enable substitutions (could work for arbitrary roles then, not just code or code blocks)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions