You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#703 introduced a really helpful extension which makes writing code blocks a lot simpler. In the majority of cases, being able to specify the linenos and emphasize-lines parameters is sufficient for smaller blocks. The only other thing I find myself needing to do frequently is name the blocks.
For context: I work on a project where we document a lot of duplicate classes/functions across a number of platforms. I use the code block name to generate tooltips for hovering over function names in the document and show the invocation as it is in the code.
My team has indicated that using the standard ```{language} invocation for code blocks makes their lives a lot simpler than needing to remember the {code-block} directive and additional parameters inside the block, and that the syntax using the `attrs_block` is more readable to them in the source document than something with nested parameters. If possible, I'd like to be able to fully replace the `{code-block}` invocation in my project since we use very few of Sphinx's other features for these blocks.
Proposal
If possible, I'd like to be able to use the new functionality introduced in the attrs_block plugin to replace the following syntax:
```{code-block} java
:name: android-method1
public void method1 (boolean argument)
```
With something like this:
{name="android-method1"}
```java
public void method1 (boolean argument)
```
Tasks and updates
No response
The text was updated successfully, but these errors were encountered:
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Context
#703 introduced a really helpful extension which makes writing code blocks a lot simpler. In the majority of cases, being able to specify the
linenos
andemphasize-lines
parameters is sufficient for smaller blocks. The only other thing I find myself needing to do frequently is name the blocks.For context: I work on a project where we document a lot of duplicate classes/functions across a number of platforms. I use the code block name to generate tooltips for hovering over function names in the document and show the invocation as it is in the code.
My team has indicated that using the standard ```{language} invocation for code blocks makes their lives a lot simpler than needing to remember the
{code-block}
directive and additional parameters inside the block, and that the syntax using the `attrs_block` is more readable to them in the source document than something with nested parameters. If possible, I'd like to be able to fully replace the `{code-block}` invocation in my project since we use very few of Sphinx's other features for these blocks.Proposal
If possible, I'd like to be able to use the new functionality introduced in the
attrs_block
plugin to replace the following syntax:With something like this:
Tasks and updates
No response
The text was updated successfully, but these errors were encountered: