summary refs log tree commit diff stats
path: root/nimdoc/rst2html
Commit message (Collapse)AuthorAgeFilesLines
* Keep the doc sidebar on the screen while scrolling (#19851)JJ2022-06-151-46/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [docgen] Group sidebar sections into <details> (open by default) * [docgen] Consistent indentation in generated HTML (this is a boon for working on docgen's html/css output) * [docgen] Move Source/Edit buttons inside main div This makes styling the documentation significantly easier. * [docgen] Somewhat consistent CSS formatting * [docgen] Keep the sidebar onscreen while scrolling * [docgen] Tweak CSS for the sticky sidebar * [docgen] search type=text ==> type=search * [docgen] Update expected doc output * [docgen] Fix Group by Type sidebar placement bug * [docgen] Curse you, whitespace (fix tests) * [docgen] Fix rst2html tests Co-authored-by: sandytypical <43030857+xflywind@users.noreply.github.com>
* rewrite docs JS in Nim (#19701)flywind2022-04-091-43/+0
| | | | | | | * rewrite docs JS in Nim * fixup * fix nimdoc/rsttester
* rm redundant blank lines before literal blocks (#18465)Andrey Makarov2021-07-081-10/+5
|
* Fix JS error on index page and detect dark mode (#18191)drtheuns2021-06-071-4/+9
| | | | | | | | | | | | | | | | * Fix JS error on index page and detect dark mode The theindex.html page doesn't have a dark mode switch so the main function will error because `toggleSwitch` is not defined. Checks have been added to prevent this from happening. Also add automatic detection of system settings for dark-mode. This could also be done with pure css, but then the dark mode variable declarations would have to be duplicated to work with the switch so I went with this approach. * Fix nimdoc tests * Fix rst2html tests
* rst indentation fixes (ref #17340) (#17715)Andrey Makarov2021-04-151-2/+2
|
* enable syntax highlighting for inline code (#17585)Andrey Makarov2021-04-022-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | * enable syntax highlighting for inline code * finish '.. default-role' and preliminary '.. role' implementation * more compact check in dirRole * set :literal: as default role for *.rst * Update lib/packages/docutils/rst.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * use whichRole for setting currRoleKind * Update lib/packages/docutils/rst.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * rename rnGeneralRole -> rnUnknownRole Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* fix #17260 render `\` properly in nim doc, rst2html (#17315)Timothee Cour2021-03-241-1/+1
|
* RST: improve line blocks (#16518)Andrey Makarov2020-12-311-1/+1
|
* doc/rst2html: some few fixes for enumerated and bullet lists (#16295)Andrey Makarov2020-12-141-6/+8
| | | | | | | | | | | | * fix bullet/enumarated lists with many blank lines * fix enumerated list parsing * fix parse failure when next line after list empty * implement arbitrary start of enumerator * check that enumerators are in order * remove redundant start=x if x=1 or a * add some doc on implemented features * update start in rst_examples.rst * allow upper-case letters + more docs
* nimdoc: Initialize theme switch and pragma dots on DOMContentLoaded (#16247)Sebastian Reinhard2020-12-061-1/+3
| | | | | | | | | The default HTML template for nimdoc currently initializes the dark mode switch and pragma dots when the onload event is fired. But since the onload event does not fire until all external resources (images, stylesheets, fonts, etc.) have been loaded, the light theme is shown for a brief moment before the document is fully loaded, and it switches to the dark theme. This is quite jarring, especially on slower internet connections. So let's instead initialize these things on the DOMContentLoaded event, which is fired right after the document has been parsed and the initial DOM structure is ready. This means that we now display the dark mode immediately, without having to wait for external resources to load first. For reference, see: - https://developer.mozilla.org/en-US/docs/Web/API/Window/load_event - https://developer.mozilla.org/en-US/docs/Web/API/Window/DOMContentLoaded_event I have updated the snapshot tests in `nimdoc/`, and done some manual testing of both the theme switch and the pragma dots, to confirm that this does not break anything. Please let me know if I've missed anything.
* RST tables: fix latex col number; allow less than three of `=` (#16040)Andrey Makarov2020-12-041-2/+2
|
* add a tester for rst2html (#15936)Miran2020-11-122-0/+829