Andrey Makarov
b21eb1ed36
change os.nim doc links to new style ( #19102 )
2021-11-08 13:10:01 +01:00
Andrey Makarov
7ba2659f73
docgen: implement doc link resolution in current module ( #18642 )
2021-10-28 19:20:52 +02:00
Andreas Rumpf
e0ef859130
strict effects ( #18777 )
...
* 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
2021-09-02 12:10:14 +02:00
flywind
061a9183f7
replace wrt with proper word ( #18724 )
...
* what does wrt mean?
* clarify
2021-08-22 06:21:53 +02:00
Kyle Brown
31fc0f9718
Remove unused imports, and deprecated function usage ( #18663 )
...
* clean up imports and slice to remove delete
* revert buggy code
* Replace "delete" with setlen to remove depreciation warning
2021-08-11 01:26:42 +02:00
Miran
4eca84cff7
don't use plus instead of space ( #18589 )
2021-07-26 19:13:47 -04:00
Andrey Makarov
10da888c07
docgen: sort symbols ( fix #17910 ) ( #18560 )
...
* 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 `<`)
2021-07-25 23:01:19 +02:00
Andrey Makarov
8c7ee96457
rst: add missing line/column info for some warnings ( #18383 )
...
* rst: add missing line/column info for some warnings
* add workaround
* use TLineInfo/FileIndex for storing file names
* fix blank lines in include file (rm harmful strip)
* don't use ref TLineInfo
* return `hasToc` as output parameter for uniformity
* 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 >
* address review - stylistic things
* Update compiler/docgen.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* unify RST warnings/errors names
* doAssert + minor name change
* fix a bug caught by doAssert
* apply strbasics.strip to final HTML/Latex
* rm redundant filename
* fix test after rebase
* delete `order` from rnFootnoteRef,
also display errors/warnings properly when footnote references are from
different files
* Update compiler/lineinfos.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* Update lib/packages/docutils/rstast.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* Update lib/packages/docutils/rstast.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* Update lib/packages/docutils/rstast.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* revert because of error:
Error: cannot prove that it's safe to initialize 'info' with the runtime value for the discriminator 'kind'
* Update lib/packages/docutils/rstgen.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* apply suggestion
* Update lib/packages/docutils/rst.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* add Table for string->file name mapping
* do not import compiler/lineinfos
* fix ambiguous calls
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
Co-authored-by: narimiran <narimiran@disroot.org >
2021-07-20 08:32:22 +02:00
Timothee Cour
488e9c2991
nim doc now correctly renders deprecated pragmas for routines and types ( #18515 )
2021-07-19 12:42:45 +02:00
Timothee Cour
ae7e7756fe
runnableExamples now show originating location in stacktraces on failure ( #18457 )
...
* runnableExamples now show originating location in stacktraces on failure
* PRTEMP
* fix indentation inside multiline strings
2021-07-09 11:41:28 +02:00
Timothee Cour
0b7361e938
followup #18362 : make UnusedImport work robustly ( #18366 )
...
* warnDuplicateModuleImport => hintDuplicateModuleImport
* improve DuplicateModuleImport msg, add test
2021-06-27 20:39:16 +02:00
Andrey Makarov
1b3c0f142d
validate rst field for :number-lines:, :status: ( #18304 )
2021-06-20 20:00:42 +02:00
Andrey Makarov
590d457631
docgen: move to shared RST state ( fix #16990 ) ( #18256 )
...
* 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 >
2021-06-20 09:50:03 +02:00
Andreas Rumpf
28f2abe1a2
fixes #18112 ( #18165 )
2021-06-03 20:55:41 +02:00
Andrey Makarov
ba3ec7b049
docs: Latex generation improvements ( #18141 )
...
* docs: improve Latex generation
* make it work on Windows + fix ] escaping
* minor fixes with escapes and style
2021-06-01 20:47:23 +02:00
Andrey Makarov
1568ae23c6
docgen: escape special characters in titles ( #18014 )
2021-05-15 06:53:38 +02:00
Andrey Makarov
97970d9dcc
doc2tex: generate docs to Latex (#17997 )
...
* `doc2tex`: generate docs to Latex
* address some comments
2021-05-14 07:30:47 +02:00
Andreas Rumpf
d84a3b10b5
fixes #17675 ( #17981 )
2021-05-09 11:34:28 +02:00
Andrey Makarov
706562f661
docgen: get rid of ropes ( #17939 )
2021-05-05 00:10:05 -07:00
Andrey Makarov
1640508348
more strict RST inline markup parsing ( #17827 )
...
* more strict RST inline markup parsing
* add test for unexpected bonus
* introduce `roPreferMarkdown`
2021-04-29 17:31:15 +02:00
Timothee Cour
da1c1a7117
--filenames:abs|canonical|legacyRelProj for filenames in compiler msgs (replaces --listfullpaths:on|off) (#17746 )
...
* use canonicalImport for filename_magicSauce
* --filenames:abs|canonical|magic
* rename: magic => legacyRelProj
2021-04-21 15:26:27 +02:00
Timothee Cour
5c9c1988f6
-d:nimDebug: calls doAssert false instead of quit ( #17739 )
2021-04-17 11:49:54 +02:00
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