| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
* Use link from webpage. Closes #14476
* Update doc generation tests
* Update RST test
|
|
|
|
|
|
|
| |
* move google fonts to the last part
* fixes tests
* fix rst2html
|
|
|
|
|
| |
* fixes #20524; add forbids pragmas to hideable lists
* fixes nimdoc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implement Pandoc Markdown concise link extension
This implements https://github.com/nim-lang/Nim/issues/20127.
Besides reference to headings we also support doing references
to Nim symbols inside Nim modules.
Markdown:
```
Some heading
------------
Ref. [Some heading].
```
Nim:
```
proc someFunction*() ...
... ## Ref. [someFunction]
```
This is substitution for RST syntax like `` `target`_ ``.
All 3 syntax variants of extension from Pandoc Markdown are supported:
`[target]`, `[target][]`, `[description][target]`.
This PR also fixes clashes in existing files, particularly
conflicts with RST footnote feature, which does not work with
this PR (but there is a plan to adopt a popular [Markdown footnote
extension](https://pandoc.org/MANUAL.html#footnotes) to make footnotes work).
Also the PR fixes a bug that Markdown links did not work when `[...]`
section had a line break.
The implementation is straightforward since link resolution did not
change w.r.t. RST implementation, it's almost only about new syntax
addition. The only essential difference is a possibility to add a custom
link description: form `[description][target]` which does not have an
RST equivalent.
* fix nim 1.0 gotcha
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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 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>
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
| |
Fixed tocRoot placement
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [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
* fixup
* fix nimdoc/rsttester
|
|
|
| |
in group name)
|
|
|
|
|
|
|
| |
* implement RST & Markdown quote blocks
* compile with nim 1.0
* Fix indentation
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
| |
* support same-line comments in routines
* remove assert as per review comment
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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 `<`)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
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
|
|
|
|
| |
nested templates (#18082)
|
|
|
|
|
|
|
| |
* 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
* address some comments
|
|
|
|
|
| |
* follow-up #17837: add `Console` for interactive sessions
* fix Latex
|
|
|
|
|
| |
* typo: nonexistant => nonexistent
* fix test (ordering differs because of https://github.com/nim-lang/Nim/issues/17910)
|
|
|
|
|
| |
* improve nimsuggest/tester
* koch improvements
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* WIP: restyle RST option lists
* apply similar style to Latex
* fix tests
* minor visual tweaks
* update tests
* remove leftover comments
|
|
|
| |
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
| |
(#17054)
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
(#17416)
* fix #16901: sidebar groups now works with all routines, not just proc,func
* fix tests
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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
* 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>
|
| |
|
| |
|
|
|
|
|
| |
* both funcs and procs are under the same section in the documentation
* update the test
|
|
|
|
|
|
|
|
|
| |
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
* add a test
|
|
|
|
| |
* "eg" is a misspelled "egg", "e.g." is "exempli gratia"
* Also, "ie" is "i.e.".
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
* 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
* 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
|