Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
neongreen-sc opened this issue Oct 27, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@neongreen-sc
Copy link

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)
@neongreen-sc neongreen-sc added the enhancement New feature or request label Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant