For the few weird code blocks where default highlighting does not work,
we must add the 'highlight' class manually to get matching backgrounds.
This reuses the background color defined in pygments.css.
There are a few code blocks where the default highlighting does not
work and the documentation looks bad as a result. Usually this happens
when we are demonstrating an important interactive feature, such as
autosuggestions, syntax highlighting, or tab completion.
The pygments highlighter was not designed for code samples like these.
But it is important to show the behavior clearly in the docs. I am
attempting to make these weird examples look as much like the "normal"
code blocks as possible.
https://docutils.sourceforge.io/docs/ref/rst/directives.html#parsed-literal
- add missing links for some commands (control flow section)
- fix broken links that use the old syntax (#tut_ links)
- miscellaneous fixing of backticks/emphasis
At least on some versions/systems, pkg-config outputs a trailing
space. Since the usually-desired behavior isn't to have a blank argument,
recommend using `string split -n` instead of `string split`.
Fixes#6836.
[ci skip]
When we say "the XYZ command/builtin", we should typically include a
link. The exceptions are
- In the documentation for that command - no need to link to ulimit in
the ulimit page
- When we've already linked before - not every thing needs to be
clickable, or clicking it will cause the browser to mark fifty words
as visited. This is roughly what wikipedia does for crosslinks.
[ci skip]
This used to use doxygen's html blocks, which don't have a *direct*
equivalent in sphinx in code blocks.
Instead of adding this to the pygments highlighter, let's just use
some roles.
It's a teensy bit awkward as we then use block styling, but we want to
add more of our own styling anyway, so we can presumably get this
somehow, and these html tags look awkward and confuse people.
Fix#6640
[ci skip]