rst: single backticks now render correctly in both rst2html and github (#17028)

* rst: `` => `
* support default-role in rst2html
* update docstyle regarding single vs double backticks
This commit is contained in:
Timothee Cour 2021-02-13 00:30:23 -08:00 • committed by GitHub
commit 190fe36eba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 76 additions and 60 deletions

View file

@ -12,7 +12,9 @@ General Guidelines
each sentence after the first should be complete and in present tense.
* Documentation is parsed as a custom ReStructuredText (RST) with partial markdown support.
* In nim sources, prefer single backticks to double backticks since it's simpler
and `nim doc` supports it (even in rst files with `nim rst2html`).
and `nim doc` supports it. Likewise with rst files: `nim rst2html` will render those as monospace, and
adding `.. default-role:: code` to an rst file will also make those render as monospace when rendered directly
in tools such as github.
* In nim sources, for links, prefer `[link text](link.html)` to ``` `link text<link.html>`_ ```
since the syntax is simpler and markdown is more common (likewise, `nim rst2html` also supports it in rst files).