Commit Graph

34 Commits

Author SHA1 Message Date
Manuel Bojato
04232d92cd Fix theme switch load from local storage (#14897)
* fix theme switch load from local storage

* Fix tests

Co-authored-by: Clyybber <darkmine956@gmail.com>
2020-07-10 15:06:07 +02:00
Timothee Cour
2867a33ebc fix #14846; add macros.extractDocCommentsAndRunnables (#14849)
* fix #14846; add macros.extractDocCommentsAndRunnables

* fixup

* update tests

* address comment
2020-07-01 09:26:23 +02:00
Timothee Cour
bb62feff72 fix #14691 docgen works again for methods (#14701)
* fix #14691 docgen methods

* fixup
2020-06-18 08:47:16 +02:00
Timothee Cour
0a27cca4b5 runnableExamples: correctly handle multiline string litterals (#14492)
* runnableExamples: correctly handle multiline string litterals

* address comments: improve doc comments + variable namings
2020-06-01 15:56:29 +02:00
Timothee Cour
e646c16e06 hotfix doc comments for procs without body (#14494) 2020-05-29 05:30:36 -07:00
Timothee Cour
579456d520 fix #14485 (#14487) 2020-05-28 19:00:36 -07:00
Timothee Cour
e013ebc91a fix #8871 runnableExamples now preserves source code comments, litterals, and all formatting; other bug fix (#14439)
* fix #8871 runnableExamples now preserves source code comments, litterals, and all formatting
* remove orig deadcode from getAllRunnableExamplesImpl
* fix expected examples
* add test to close https://github.com/nim-lang/Nim/issues/14473
* correctly handle regular comments before 1st token inside runnableExamples
* add test to answer https://github.com/nim-lang/Nim/pull/14439#discussion_r431829199
* update tests
2020-05-28 20:46:06 +02:00
Timothee Cour
58282547f6 fix #6583, fix #14376, index+search now generated for all projects, many bug fixes with nim doc (#14324)
* refs #6583 fix nim doc output
* changelog
* change default for outDir when unspecified
* cleanups
* --project implies --index
2020-05-25 13:25:40 +02:00
Timothee Cour
3d20f14193 fix #10731 ; runnableExamples "-b:cpp --run:off": code works (#14384)
* runnableExamples "-b:cpp -r:off": code
2020-05-20 09:45:34 +02:00
Clyybber
41cf609fc7 Fix docs (#13176) 2020-01-16 22:22:17 +01:00
Timothee Cour
1b54be7779 fixes #12998 nim doc regression (#13117) 2020-01-16 14:19:58 +01:00
Andreas Rumpf
c282cee4db feature dracula themed doc (#12816)
* Implement gorgeous Dracula themed Nim documentation

* Add color for escape sequences

* fixes the test cases

* the big CSS cleanup
2019-12-10 06:48:11 +01:00
Elliot Waite
5da27a891c Removing the mention of using discard for block comments (#12837) [backport]
* Remove mention of using `discard` for block comments

* Add a 32x32 alternate favicon
2019-12-08 20:16:17 +01:00
Ridho Pratama
7ef4bffa79 renderer letAux fix only for octal literal (#12343)
* renderer letAux fix only for octal literal

* Handle when it's octal -1 for i64

* Added testcases
2019-10-08 11:12:24 +02:00
Hugo Locurcio
0a1cb631a2 Implement some custom formatting for input fields in the documentation (#11632)
* Implement some custom formatting for input fields in the documentation

Aside of resulting in more consistent appearance across browsers,
this also fixes input form rendering when using Firefox with a
dark system theme on Linux.

* change the expected html in the tests
2019-07-03 07:40:24 +02:00
LemonBoy
7d217a71d3 Render deprecated pragmas (#8886)
* Render deprecated pragmas
* fix the expected html
* clean up the documentation regarding deprecations
* fix typo
* fix system.nim
* fix random
2019-06-03 10:15:20 +02:00
Jasper Jenkins
e64dde734b Fixes #11078 (#11079)
* Fixes #11078
* Move to existing runnableExamples, update the expected html.
* Remove second comment token.
2019-04-23 14:20:27 +02:00
Miran
54151ce398 docgen: add links for var, let and const (refs #10487) (#10868)
* docgen: add links for var, let and const (refs #10487)

* change the expected html
2019-03-20 11:23:38 +01:00
Anthon van der Neut
5c1c5902e2 fixes #10857 invisible span had width (#10860) 2019-03-19 10:38:48 +01:00
Miran
bba3a20e7c documentation style tweaks (#10790)
* exports are the least important field in the docs:
  they are put in the last place (at the bottom)
* indent text after proc/type declaration for an easier navigation
  (noticeable difference between declarations and examples)
* quickfix invalid style in `asynchttpserver`
2019-03-08 13:55:26 +01:00
narimiran
21b256dbc9 fix documentation CSS
- make documentation usable on small (narrow) screens
- slightly smaller font size in tables
- fix search input width
2019-02-05 14:01:47 +01:00
Miran
8cb80238c4 update documentation CSS (#10543)
* update documentation CSS
* update the expected htmls
2019-02-04 12:27:02 +01:00
narimiran
ee8bc96a89 change the expected output of nim doc 2019-01-28 16:59:07 +01:00
Araq
3de255541a docgen: do not produce trailing commas for links 2019-01-25 09:21:51 +01:00
Araq
13d667ee53 docgen: produce links for proc names 2019-01-25 09:21:51 +01:00
Araq
5ef5dc86c5 docgen: support markdown link syntax; enable markdown extensions 2019-01-11 22:17:43 +01:00
Miran
313bbf5b9b Change documentation details (closes #5525) (#9542) 2018-10-31 07:40:05 +01:00
Araq
48f73aaa1c docgen: fixes #9432 [backport] 2018-10-31 00:19:24 +01:00
Kaushal Modi
c6dfbfc2cf Do not encode the anchors in docs (id attr in a tags) (#9261)
Update the tests too.

Fixes https://github.com/nim-lang/Nim/issues/9232.
2018-10-09 20:48:00 +02:00
Kaushal Modi
2e5c759736 Make "koch docs" copy the dochack.js to the right location too
- Fixes https://github.com/nim-lang/Nim/issues/9104.
- Fixes https://github.com/nim-lang/Nim/issues/9095.

Expect dochack.js to be fetched from the doc/html/ dir instead of from
doc/.

Also remove an unused and unexported proc pathPart.
2018-09-29 13:15:29 -04:00
Kaushal Modi
de8cb0a1cf Encode non-alphanum chars like %, + in URLs in the docs
Use $itemSymOrIDEnc instead of $itemSymOrID in the id and href attr in
a tags.

Fixes https://github.com/nim-lang/Nim/issues/9097.

Thanks to @LemonBoy for helping with this commit.

---

Update the tests too -- "nim c -r nimdoc/tester" passes.
2018-09-28 13:52:54 -04:00
LemonBoy
4d9aec1858 Revert #7964
Somehow the test case doesn't crash anymore and the regression in the
doc generation is fixed.

Fixes #9019
2018-09-21 18:59:46 +02:00
Araq
9b29436f62 make documentation generator tests green again 2018-09-13 23:18:51 +02:00
Andreas Rumpf
b017138c32 added a test for 'nim doc' 2018-09-07 19:21:16 +02:00