-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
rst: runnableExamples affects rst underline headings #16990
Comments
there are 2 separate problems here:
I almost have a PR for the easy one. Regarding the hard one - I think it would be logical to consider all doc comments as parts of one document, at least in sharing |
+1 to that. This may also help with nim-lang/RFCs#125 (DRY doc links) and the WIP RFC timotheecour#228 (lightweight refs in docs). |
* docgen: move to shared RST state (fix nim-lang#16990) * Update lib/packages/docutils/rst.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de> * Update lib/packages/docutils/rst.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de> * Update lib/packages/docutils/rst.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de> * Update compiler/docgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update compiler/docgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update compiler/docgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/packages/docutils/rst.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * rename `cmdDoc2` to `cmdDoc` * fix (P)RstSharedState convention * new style of initialization * misc suggestions * 1 more rename * fix a regression Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
Example
Current Output
Expected Output
Lists4 ------
is a bug, should appear asList2
Lists3
is a bug, should appear asList2
everything else works fine
workaround
use markdown style prefix form (list5,...,list9) instead of underline form as was done in #16981
(not really a workaround since prefix form is IMO better style, more familiar for markdown users, and easier to use since you don't have to match the length of title with underline markers)
Additional Information
1.5.1 0d34345
/cc @a-mr since you've fixed many rst issues recently :)
The text was updated successfully, but these errors were encountered: