-
-
Notifications
You must be signed in to change notification settings - Fork 201
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
Add support for verbatim inline elements #560
Conversation
1bd2913
to
68890ca
Compare
853952e
to
d3f9e12
Compare
This extends the current verbatim rST support with a new option "embed:rst:inline", which can be used to generate an inline node, instead of the paragraph node used by other verbatim blocks. Signed-off-by: Fabio Utzig <[email protected]>
* Update rst.h example with a function that includes an inline rST cpp domain link to another function using a verbatim * Update markups.rst with an inline verbatim section * Add Doxygen ALIAS to for an inline verbatim element Signed-off-by: Fabio Utzig <[email protected]>
@vermeeren I believe this PR is also OK now, I will rebuild the Zephyr Project's documentation using this new feature and if I'll let you know afterwards. Btw, I tried to write some unit tests for this PR, but mocking the docutils statemachine soon turned out be not very reasonable! 🤣 |
Just rebuilt the Zephyr documentation with both this PR and #566 enabled and the results look pretty good! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very clean patchset, thanks a lot @utzig!
This extends the current verbatim rST support with a new option "embed:rst:inline", which can be used to generate an inline node, instead of the paragraph node used by other verbatim blocks.
For a bit of perspective, for the Zephyr project (https://docs.zephyrproject.org/) and for Nordic's nRF Connect SDK (http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/index.html), we use the
.. option:
directive to create an entry for each existing configuration option in the kernel (and apps, libs, etc). For someone not acquainted this is very similar to configuration options in the Linux kernel (CONFIG_*).We refer a lot to those options over all the documentation. In rST it is straight-forward to do using:
But in Doxygen headers the only way to get those xrefs working was to use a
\verbatim
, with the side-effect that it results in a<paragraph \>
node, so it cannot be used inline.This PR allows for one to specify an option by using:
or by using a Doxygen alias:
just
@option{CONFIG_<some_option_name>}
.