summary refs log tree commit diff stats
path: root/nimdoc
Commit message (Collapse)AuthorAgeFilesLines
* rewrite docs JS in Nim (#19701)flywind2022-04-096-258/+0
| | | | | | | * rewrite docs JS in Nim * fixup * fix nimdoc/rsttester
* Fix group reference (with capital letters (#19196)Andrey Makarov2021-12-204-0/+42
| | | in group name)
* implement RST & Markdown quote blocks (#19147)Andrey Makarov2021-11-231-0/+5
| | | | | | | * implement RST & Markdown quote blocks * compile with nim 1.0 * Fix indentation
* docgen: implement doc link resolution in current module (#18642)Andrey Makarov2021-10-289-15/+638
|
* feat: copy to clipboard (#18963)Abishek PY2021-10-221-1/+31
| | | | | | | | | | | * feat: copy to clipboard * fix: CI failure related issue * fix: CI failure issue * fix: copy to clipboard button bug * feat: copy pragmadots value to clipboard
* [minor] give more friendly description (#18973)flywind2021-10-071-1/+1
|
* we need something better than warningAsError for effect handling viol… ↵Andreas Rumpf2021-09-041-1/+1
| | | | | | (#18796) * we need something better than warningAsError for effect handling violations
* strict effects (#18777)Andreas Rumpf2021-09-022-5/+7
| | | | | | | | | | | | | | | | | * fixes #17369 * megatest is green for --cpu:arm64 * docgen output includes more tags/raises * implemented 'effectsOf' * algorithm.nim: uses new effectsOf annotation * closes #18376 * closes #17475 * closes #13905 * allow effectsOf: [a, b] * added a test case * parameters that are not ours cannot be declared as .effectsOf * documentation * manual: added the 'sort' example * bootstrap with the new better options
* docgen: draw frame around active anchors (#18607)Andrey Makarov2021-07-294-74/+154
|
* support same-line doc comments in routines (#18595)Timothee Cour2021-07-274-1/+171
| | | | * support same-line comments in routines * remove assert as per review comment
* docgen: sort symbols (fix #17910) (#18560)Andrey Makarov2021-07-252-335/+335
| | | | | | | | | | | | | | * docgen: sort symbols (fix #17910) * add workaround + change naming * switch to a dedicated sort comparator * fix numbers with unequal string lengths * dedicated `sortName` instead of `plainNameEsc`: * more compact names for non-overloaded symbols * more predictable Ascii sort (e.g. `<` instead of `&lt;`)
* nim doc now correctly renders deprecated pragmas for routines and types (#18515)Timothee Cour2021-07-194-3/+23
|
* rm redundant blank lines before literal blocks (#18465)Andrey Makarov2021-07-081-10/+5
|
* docgen: move to shared RST state (fix #16990) (#18256)Andrey Makarov2021-06-201-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * docgen: move to shared RST state (fix #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>
* Fix JS error on index page and detect dark mode (#18191)drtheuns2021-06-076-24/+54
| | | | | | | | | | | | | | | | * 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
* fix #16993, #18054, #17835 runnableExamples now works with templates and ↵Timothee Cour2021-06-023-10/+15
| | | | nested templates (#18082)
* fix warnings/hints in nimdoc/tester.nim (#18083)Timothee Cour2021-05-303-13/+16
| | | | | | | * fix warnings/hints in nimdoc/tester.nim * improve err msg for nimdoc/tester.nim and change flag from fixup to nimTestsNimdocFixup * address comment: put back quit instead of doAssert
* `doc2tex`: generate docs to Latex (#17997)Andrey Makarov2021-05-142-90/+90
| | | | | * `doc2tex`: generate docs to Latex * address some comments
* follow-up #17837: add `Console` for interactive sessions (#17930)Andrey Makarov2021-05-061-0/+8
| | | | | * follow-up #17837: add `Console` for interactive sessions * fix Latex
* typo: nonexistant => nonexistent (#17918)Timothee Cour2021-05-024-11/+11
| | | | | * typo: nonexistant => nonexistent * fix test (ordering differs because of https://github.com/nim-lang/Nim/issues/17910)
* gitutils: add diffStrings, diffFiles, and use it in testament to compare ↵Timothee Cour2021-04-302-2/+4
| | | | | | | | | | | | | expected vs gotten (#17892) * gitutils: add diffStrings, diffFiles, and use it in testament to compare expected vs gotten * refactor with createTempDir * cleanup * refacotr * PRTEMP fake test spec changes to show effect of diffStrings * add runnableExamples for experimental/diff + cross-reference with gitutils * Revert "PRTEMP fake test spec changes to show effect of diffStrings" This reverts commit 57dc8d642dce6c1127c98b7cbc9edbfe747d4047.
* improve nimsuggest/tester, minor improvements to koch.nim (#17879)Timothee Cour2021-04-291-1/+1
| | | | | * improve nimsuggest/tester * koch improvements
* add RST highlighting for command line / shells (also fixes #16858) (#17789)Andrey Makarov2021-04-211-5/+26
|
* rst indentation fixes (ref #17340) (#17715)Andrey Makarov2021-04-151-2/+2
|
* restyle RST option lists (#17637)Andrey Makarov2021-04-101-0/+27
| | | | | | | | | | | | | * WIP: restyle RST option lists * apply similar style to Latex * fix tests * minor visual tweaks * update tests * remove leftover comments
* fix #17615(runnableExamples silently ignored if placed after some code) (#17619)flywind2021-04-022-4/+4
| | | Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* enable syntax highlighting for inline code (#17585)Andrey Makarov2021-04-023-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* docgen: render pragmas by default except for a select list (and fix #9074) ↵Timothee Cour2021-04-013-43/+43
| | | | (#17054)
* fix https://github.com/nim-lang/RFCs/issues/352: show top-level import for ↵Timothee Cour2021-03-291-4/+8
| | | | | | | | | top-level runnableExamples in generated docs (#17542) * fix https://github.com/nim-lang/RFCs/issues/352: show top-level import for top-level runnableExamples in generated docs * use canonical imoprt * fix test
* fix #17260 render `\` properly in nim doc, rst2html (#17315)Timothee Cour2021-03-241-1/+1
|
* fix #16973 ; nim doc now shows correct, canonical import name in title (#16999)Timothee Cour2021-03-231-2/+2
| | | | * nim doc now shows correct import name in title
* fix #16901: sidebar groups now works with all routines, not just proc,func ↵Timothee Cour2021-03-192-33/+90
| | | | | | | (#17416) * fix #16901: sidebar groups now works with all routines, not just proc,func * fix tests
* RST heading improvements (fix #17091) (#17195)Andrey Makarov2021-03-021-0/+1
|
* RST: implement footnotes and citations (#16960)Andrey Makarov2021-02-151-0/+13
| | | | | | | | | * RST: implement footnotes and citations * manual fixup of nimdoc.out.css * remove unused code * shorter printing code * Update lib/packages/docutils/rst.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fix #16885: nimdoc css warning (#16893)zetashift2021-02-011-0/+2
| | | | | | | | | | | | | | | | | | | * fix #16885 * Fixup nimdoc for the CSS filter change * Use the same Nim devel versions * Revert "Use the same Nim devel versions" This reverts commit 8559308f9be54a674f3ac3893efe16e03ecf4d38. * Revert "Fixup nimdoc for the CSS filter change" This reverts commit 99ec00a4bd7c448763b2073a7c6f1332bbab924b. * Fixup nimdoc.out.css Co-authored-by: zetashift <rishi2@laptop.localdomain>
* fix #9102 docgen: sidebar now shows proc signatures instead of encoding (#16857)Timothee Cour2021-01-295-35/+973
|
* conservative approach to fix #15184 (#16723)Andrey Makarov2021-01-154-0/+23
|
* 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
* put both funcs and procs under the same section in the documentation (#16301)Miran2020-12-091-23/+12
| | | | | * both funcs and procs are under the same section in the documentation * update the test
* nimdoc: Initialize theme switch and pragma dots on DOMContentLoaded (#16247)Sebastian Reinhard2020-12-066-6/+18
| | | | | | | | | 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
|
* fix #16164, render doc comments (#16230)Miran2020-12-024-1/+18
| | | | | * fix #16164, render doc comments * add a test
* add a tester for rst2html (#15936)Miran2020-11-123-0/+863
|
* Correct all eggs (#15906)Miran2020-11-101-1/+1
| | | | * "eg" is a misspelled "egg", "e.g." is "exempli gratia" * Also, "ie" is "i.e.".
* fix #15702, show enum fields documentation (#15792)Miran2020-10-304-1/+44
|
* [backport: 1.4] Better linebreaks (#15658)Miran2020-10-223-61/+61
|
* add Source+Edit links on top of every docgend file (#15642)Timothee Cour2020-10-223-0/+3
|
* docgen: improve alignment of comments (still not perfect) (#15506)Andreas Rumpf2020-10-071-5/+6
| | | | | | | * docgen: improve alignment of comments (still not perfect) * fix error message text in `tunknown_named_parameter` Co-authored-by: narimiran <narimiran@disroot.org>
* group procs of the same name in TOC (#15487)Miran2020-10-053-61/+157
| | | | | | | | | | | * group procs of the same name in TOC * correctly show `sink` parameters in TOC * no need to reinvent the wheel - `mgetorPut` exists * better setting of text color [ci skip] * fix CSS for better alignment