flywind
a807233aeb
fix #17615(runnableExamples silently ignored if placed after some code) ( #17619 )
...
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-04-02 18:26:30 -07:00
Andrey Makarov
e35946f306
enable syntax highlighting for inline code ( #17585 )
...
* 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>
2021-04-02 22:11:44 +02:00
Timothee Cour
a7bb973a24
docgen: render pragmas by default except for a select list (and fix #9074 ) ( #17054 )
2021-04-01 08:45:55 +02:00
Timothee Cour
d23a757765
fix https://github.com/nim-lang/RFCs/issues/352 : show top-level import for 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
2021-03-29 16:25:27 +02:00
Andreas Rumpf
5f5a92379f
custom integer literals ( #17489 )
...
* user defined integer literals; refs #17020
* updated renderer.nim
* use mlexerutils helper
* imported all test cases from https://github.com/nim-lang/Nim/pull/17020
* final grammar updated
2021-03-24 14:46:19 +01:00
Timothee Cour
64e6670de4
fix #16973 ; nim doc now shows correct, canonical import name in title ( #16999 )
...
* nim doc now shows correct import name in title
2021-03-23 09:31:23 +01:00
Timothee Cour
452366982d
fix #16901 : sidebar groups now works with all routines, not just proc,func ( #17416 )
...
* fix #16901 : sidebar groups now works with all routines, not just proc,func
* fix tests
2021-03-19 07:17:09 +01:00
Andrey Makarov
4bfc5a9551
Rst test check messages ( fix #17280 ) ( #17338 )
2021-03-17 20:13:04 +01:00
Andrey Makarov
d97bf4f1c8
fix RST parsing when no indent after enum.item ( fix #17249 ) ( #17257 )
2021-03-12 08:33:21 +01:00
Timothee Cour
d161d27cdd
fix #13491 #17279 runnableExamples now don't get lost in translation ( #17282 )
...
* fix #13491 runnableExamples rendering
* fix a runnableExamples thanks to this bugfix
2021-03-09 07:09:24 +01:00
Andrey Makarov
02f4464058
RST heading improvements ( fix #17091 ) ( #17195 )
2021-03-02 16:41:10 +01:00
Timothee Cour
ff3ace2232
fix code-block test bugs: fix #17183 , fix https://github.com/timotheecour/Nim/issues/620 ( #17184 )
...
* fix code-block test bugs: fix #17183 , fix https://github.com/timotheecour/Nim/issues/620
* cleanup
2021-02-26 16:05:20 +01:00
Andrey Makarov
fab1618eb4
make rst.nim use object variant ( #17138 )
...
* make rst.nim use object variant
* add workaround
* fix mistake
2021-02-22 11:00:31 +01:00
Andrey Makarov
d1fec552d0
stricter checks for RST headlines ( #17089 )
2021-02-20 18:01:45 +01:00
Andrey Makarov
35bd39a9d0
RST: implement footnotes and citations ( #16960 )
...
* 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>
2021-02-15 14:12:40 +01:00
n5m
c548f97241
quote nim command on compile ( #16954 )
2021-02-07 00:31:58 +01:00
Timothee Cour
6e267d28b3
remove conditionals on nimHasUserErrors, nimNoNilSeqs2, nimNoNilSeqs ( #16861 )
...
* cleanup docs for type(nil) | type(nil); simplify nimHasUserErrors
* simplify nimNoNilSeqs2
* simplify nimNoNilSeqs
* fixup
2021-01-29 14:30:24 +01:00
Timothee Cour
7f67c593c1
improve formatting of error message when runnableExamples fails ( #16677 )
2021-01-13 19:09:00 -08:00
Andrey Makarov
fd5c8ef208
RST: implement internal targets ( #16614 )
2021-01-11 19:51:04 +01:00
Timothee Cour
df17cf5e9e
misc cleanups ( #16383 )
2020-12-18 08:53:43 +01:00
Timothee Cour
2728711dd3
fix #16248 forward --lib to runnableExamples ( #16350 )
2020-12-14 17:49:39 +01:00
Miran
40255f6721
put both funcs and procs under the same section in the documentation ( #16301 )
...
* both funcs and procs are under the same section in the documentation
* update the test
2020-12-09 10:56:28 +01:00
Miran
9a86198ed5
fix export links in the documentation ( #16114 ) [backport:1.4]
...
* fix export links in the documentation
* fix `len` problem
2020-11-24 14:26:52 +01:00
flywind
402df0b061
fix #15916 ( #15917 ) [backport]
...
* fix #15916
* add testcase for #15916
* add comments
2020-11-12 09:31:35 +01:00
Miran
ee78d76108
rst: add support for markdown tables ( #15854 )
...
* rst: add support for markdown tables
* change template into proc
* don't create unnecessary `seq[string]`
2020-11-10 09:41:26 +01:00
cooldome
00b495de95
Use modern enums in compiler ( #15775 )
2020-11-02 10:35:24 +01:00
Miran
d8a6b0b04e
[backport: 1.4] Better linebreaks ( #15658 )
2020-10-22 12:16:19 +02:00
Timothee Cour
0979524137
add Source+Edit links on top of every docgend file ( #15642 )
2020-10-22 10:44:28 +02:00
Andreas Rumpf
9a059657ca
fixes bootstrapping for any machine that has a Nim already installed [backport:1.4] ( #15660 )
2020-10-20 21:07:24 +02:00
narimiran
b418c54ec4
even more "eg" fixes [ci skip]
2020-10-20 13:58:12 +02:00
Miran
112b11c154
group procs of the same name in TOC ( #15487 )
...
* 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
2020-10-05 17:03:14 +02:00
Araq
94c8d53a03
'koch temp' bugfix
2020-09-23 10:41:33 +02:00
Clyybber
35ff17410f
Expand hoisted default params in sem ( #15270 )
...
* Expand hoisted default params in sem
Introduce ast.newTree{I,IT}
Add test for default params in procs
* Cleanup
* Simplify hoist transformation and expand test
2020-09-05 22:01:47 +02:00
Clyybber
13e659cfec
Big compiler Cleanup ( #14777 )
2020-08-28 22:18:09 +02:00
Timothee Cour
695154970d
deprecate existsDir; use dirExists instead ( #14884 )
2020-07-03 23:04:23 +02:00
Timothee Cour
dc5a40f3f3
{.deprecated: [existsFile: fileExists].} ( #14735 )
...
* {.deprecated: [existsFile: fileExists].}
* s/existsFile/fileExists/ except under deps
* workaround pending #14819
* fix test
2020-07-02 16:19:13 +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
7cdf470269
refs #14545 fix snippet errors: avoid showing confusing errors when they are expected ( #14569 )
2020-06-05 19:04:39 -07:00
Timothee Cour
4ba34522f6
[cleanup] docgen: remove docOutdir now that outDir is always set ( #14554 )
2020-06-03 19:20:41 -07:00
Timothee Cour
3cf88c2b49
walkDirRecFilter, update doc CI filter, compiler/index.nim for docs + various other fixes ( #14501 )
...
* update doc CI filter to include the files mostly likely to require doc rebuild
* remove code duplication in ./config/nimdoc.cfg; show link to compiler docs, various fixes
* walkDirRecFilter, factor nativeToUnixPath workaround
* glob for getRst2html
* docslocal: 40s to build all docs
* revert code dedup in github actions which did not work alas...
* fixups
2020-06-01 19:21:41 +02:00
Timothee Cour
e646c16e06
hotfix doc comments for procs without body ( #14494 )
2020-05-29 05:30: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
Kaushal Modi
e62ccaa4dc
Propagate the outDir to rstgen to fix hrefs for modules in subdirs ( #14479 )
2020-05-28 00:13:24 -07:00
Timothee Cour
55758920f4
docgen: fix #14448 show @@ as .. in href text ( #14451 )
2020-05-25 18:16:00 -07:00
Timothee Cour
f96555bd10
fix #9227 procs can now have multiple interleaved doc comments + runnableExamples and be docgen'd correctly ( #14441 )
...
* fix #9227 proc doc comments after 1st runnableExamples are not ignored anymore
2020-05-25 15:44:23 +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
Clyybber
6969a468ce
Remove #PRTEMP leftover comment
2020-05-20 13:04:52 +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
Timothee Cour
5beed56d0a
fix #14174 do not collapse pragma inside runnableExamples ( #14385 )
2020-05-18 11:03:34 +02:00
Timothee Cour
c777f2fb60
fix some issues with --backend ( #14363 )
...
* fix some issues with --backend
* fix https://github.com/timotheecour/Nim/issues/175 ; improve upon #14306
2020-05-16 13:09:18 +02:00