summary refs log tree commit diff stats
path: root/nimdoc/testproject/expected/testproject.html
Commit message (Collapse)AuthorAgeFilesLines
* Prevent font flashing in the docs (#23622)Nils Lindemann2024-05-271-3/+4
| | | | | | | | | | ... by moving the Google font includes near the top of the head. By including them as early as possible, they are known, when the browser starts rendering the body. Test it by making the change manually in `doc/html/system.html` and then press ctrl+f5 (reload without cache). This removes the font flashing. Tested in Chrome and Firefox.
* closes #15176; adds a test case (#23248)ringabout2024-01-221-2/+9
| | | closes #15176
* Make `data-theme` default to "auto" in HTML (#23222)Jake Leahy2024-01-191-1/+1
| | | | | | | | | Makes docs default to using browser settings instead of light mode This should fix #16515 since it doesn't require the browser to run the JS to set the default Also means that dark mode can be used without JS if the browser is configured to default to dark mode
* fix spurious indent and newlines in rendering of nkRecList (#23121)metagn2023-12-241-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rendering of `nkRecList` produces an indent and adds a new line at the end. However for things like case object `of`/`else` branches or `when` branches this is already done, so this produces 2 indents and an extra new line. Instead, just add an indent in the place where the indent that `nkRecList` produces is needed, for the rendering of the final node of `nkObjectTy`. There doesn't seem to be a need to add the newline. Before: ```nim case x*: bool of true: y*: int of false: nil ``` After: ```nim case x*: bool of true: y*: int of false: nil ```
* fix #22492 (#22511)Hamid Bluri2023-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * fix #22492 * Update nimdoc.css remove scroll-y * Update nimdoc.out.css * Update nimdoc.css * make it sticky again * Update nimdoc.out.css * danm sticky, use fixed * Update nimdoc.out.css * fix margin * Update nimdoc.out.css * make search input react to any change (not just keyboard events) according to https://github.com/nim-lang/Nim/pull/22511#issuecomment-1685218787
* Fix non-toplevel fields in objects not getting rendered (#22266)Jake Leahy2023-07-161-1/+22
| | | | | | | | | | | | | * Add example object into testproject The proc is there to check the case of an identDef being inside an identDef (We do want to render those even if they are not exported) * Add `inside` set to `TSrcGen` which allows us to see what context we are in This is done instead of adding another inXyz bool parameter We then use this to know if we are inside an object when rendering an nkIdentDefs (To know if we need to skip rendering it) * Update test files
* fixes #21483; fixes nim doc skips documentation of annotated elements of ↵ringabout2023-04-291-0/+29
| | | | | | | | | objects (#21743) * fixes #21483; skipPragmaExpr * add a test case for #21483 * fixes HTML
* fixes #19396; Nimdoc hide nonexported fields (#21305)ringabout2023-02-011-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * suppresses non-exported fields of types and adds command-line option to re-enable this if desired * corrected the doctest that produced a CI error * an embarrassingly bad error in reasoning * modified a nimdoc test to reflect updated behavior * needed another change to bring utils.html doctest in sync with update * add info * fix nimdoc * lint * render postfix * fixes a problem * fixes nimdoc * fix nimdoc --------- Co-authored-by: johnperry-math <john.perry@usm.edu> Co-authored-by: johnperry-math <devotus@yahoo.com>
* Make async stacktraces less verbose (#21091)Jake Leahy2022-12-151-5/+6
| | | | | | | | | | | | | | | | | | | | | | | * Name iterators something human readable Remove intermediate async procs from stacktraces Clean async traceback message from reraises message * Remove unused import/variable * Fix failing tests Don't add {.stackTrace: off.} to anonymous procs (They already don't appear in stacktrace) * Fix failing tests in pragma category Now check that the nim is a routine type first so we don't run into any assertion defects * Hide stack trace pragma in docs and update doc tests User doesn't need to know if something won't appear so this more becomes verbose noise If this is a bad idea we can always add a `when defined(nimdoc)` switch so we don't add {.stackTrace: off.} to the Future[T] returning proc for docs
* Docs expand `using` parameters (#21076)Jake Leahy2022-12-121-2/+11
| | | | | | | | | | | | | | | * Trying to fix by changing renderer * add renderExpandUsing flag This flag makes the renderer expand parameters that use using statement to have their full type * Update docs * Make comment better explain why checking for nkSym * Fix nil access when macro/template has parameter with no type * Fix nil access when node is not semmed yet
* Fix #14476 (#20878)Jake Leahy2022-11-211-1/+1
| | | | | | | * Use link from webpage. Closes #14476 * Update doc generation tests * Update RST test
* move google fonts to the last part (#20541)ringabout2022-10-111-4/+3
| | | | | | | * move google fonts to the last part * fixes tests * fix rst2html
* fixes #20524; add forbids pragmas to hideable lists (#20525)ringabout2022-10-091-34/+34
| | | | | * fixes #20524; add forbids pragmas to hideable lists * fixes nimdoc
* Docs auto dark mode (#20188)Amjad Ben Hedhili2022-08-211-6/+7
| | | | | | | | | | | | | * Implement auto dark mode * Rename class * Fix borders cutout * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* .forbids pragma: defining forbidden tags (#20050)Lancer112112022-07-261-34/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * .forbids pragma: defining illegal effects for proc types This patch intends to define the opposite of the .tags pragma: a way to define effects which are not allowed in a proc. * updated documentation and changelogs for the forbids pragma * renamed notTagEffects to forbiddenEffects * corrected issues of forbids pragma the forbids pragma didn't handle simple restrictions properly and it also had issues with subtyping * removed incorrect character from changelog * added test to cover the interaction of methods and the forbids pragma * covering the interaction of the tags and forbids pragmas * updated manual about the forbids pragma * removed useless statement * corrected the subtyping of proc types using the forbids pragma * updated manual for the forbids pragma * updated documentations for forbids pragma * updated nim docs * updated docs with rsttester.nim * regenerated documentation * updated rst docs * Update changelog.md Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com> * updated changelog * corrected typo Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* Make imports/exports not be a dropdown in sidebar (#19907)Jake Leahy2022-07-161-6/+1
| | | | | | | | | * Don't make a section be a dropdown if it has no child links * - Cleaned up code - Updated tests * Document what the 'if' is checking
* Fixes #19900 (#19906)Jake Leahy2022-06-191-1/+1
| | | Fixed tocRoot placement
* Keep the doc sidebar on the screen while scrolling (#19851)JJ2022-06-151-812/+726
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [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
* docgen: implement doc link resolution in current module (#18642)Andrey Makarov2021-10-281-10/+198
|
* strict effects (#18777)Andreas Rumpf2021-09-021-4/+6
| | | | | | | | | | | | | | | | | * 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-291-59/+118
|
* docgen: sort symbols (fix #17910) (#18560)Andrey Makarov2021-07-251-330/+330
| | | | | | | | | | | | | | * 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-191-3/+15
|
* 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
* fix #16993, #18054, #17835 runnableExamples now works with templates and ↵Timothee Cour2021-06-021-5/+6
| | | | nested templates (#18082)
* fix warnings/hints in nimdoc/tester.nim (#18083)Timothee Cour2021-05-301-4/+4
| | | | | | | * 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-141-89/+89
| | | | | * `doc2tex`: generate docs to Latex * address some comments
* typo: nonexistant => nonexistent (#17918)Timothee Cour2021-05-021-7/+7
| | | | | * typo: nonexistant => nonexistent * fix test (ordering differs because of https://github.com/nim-lang/Nim/issues/17910)
* fix #17615(runnableExamples silently ignored if placed after some code) (#17619)flywind2021-04-021-1/+3
| | | Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* enable syntax highlighting for inline code (#17585)Andrey Makarov2021-04-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | * 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-011-41/+41
| | | | (#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 #16901: sidebar groups now works with all routines, not just proc,func ↵Timothee Cour2021-03-191-28/+76
| | | | | | | (#17416) * fix #16901: sidebar groups now works with all routines, not just proc,func * fix tests
* fix #9102 docgen: sidebar now shows proc signatures instead of encoding (#16857)Timothee Cour2021-01-291-32/+32
|
* conservative approach to fix #15184 (#16723)Andrey Makarov2021-01-151-0/+12
|
* 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-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.
* fix #16164, render doc comments (#16230)Miran2020-12-021-1/+10
| | | | | * fix #16164, render doc comments * add a test
* fix #15702, show enum fields documentation (#15792)Miran2020-10-301-0/+15
|
* [backport: 1.4] Better linebreaks (#15658)Miran2020-10-221-55/+55
|
* add Source+Edit links on top of every docgend file (#15642)Timothee Cour2020-10-221-0/+1
|
* 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-051-59/+149
| | | | | | | | | | | * 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
* Fix theme switch load from local storage (#14897)Manuel Bojato2020-07-101-14/+5
| | | | | | | * fix theme switch load from local storage * Fix tests Co-authored-by: Clyybber <darkmine956@gmail.com>
* fix #14846; add macros.extractDocCommentsAndRunnables (#14849)Timothee Cour2020-07-011-0/+29
| | | | | | | | | * fix #14846; add macros.extractDocCommentsAndRunnables * fixup * update tests * address comment
* fix #14691 docgen works again for methods (#14701)Timothee Cour2020-06-181-0/+58
| | | | | * fix #14691 docgen methods * fixup
* runnableExamples: correctly handle multiline string litterals (#14492)Timothee Cour2020-06-011-0/+45
| | | | | * runnableExamples: correctly handle multiline string litterals * address comments: improve doc comments + variable namings
* hotfix doc comments for procs without body (#14494)Timothee Cour2020-05-291-0/+48
|
* fix #14485 (#14487)Timothee Cour2020-05-281-0/+21
|