rst: single backticks now render correctly in both rst2html and github #17028
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
single backticks were already supported by rst2html however they didn't render as monospace in github.
this PR allows using
.. default-role:: code
(which rst2html now can handle instead of choking on it) which is interpreted by rst parsers (including github) as changing how single backticks text is rendered, changing it to monospace so that it appears like double backticks text.After this PR, there's no need anymore to use double backticks anywhere, this allows (in a future PR) to do a sweeping change and change all double backticks to single backticks, which is simpler, shorter, and more familiar for most people (familiar with markdown), so we end up with 1 way to do things instead of 2.
example
before PR
see https://github.com/nim-lang/Nim/blob/devel/doc/contributing.rst
after PR
see https://github.com/timotheecour/Nim/blob/pr_rst_singlebacktick/doc/contributing.rst
note
here's a snippet from contributing.rst that contained (before this PR) both single and double backticks. As you can see, before this PR the single backticks didn't render as monospace:
before PR
after PR
source:
future work
links