summary refs log tree commit diff stats
path: root/compiler/docgen.nim
Commit message (Collapse)AuthorAgeFilesLines
* docgen: sort symbols (fix #17910) (#18560)Andrey Makarov2021-07-251-14/+84
| | | | | | | | | | | | | | * 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;`)
* rst: add missing line/column info for some warnings (#18383)Andrey Makarov2021-07-201-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* nim doc now correctly renders deprecated pragmas for routines and types (#18515)Timothee Cour2021-07-191-12/+3
|
* runnableExamples now show originating location in stacktraces on failure ↵Timothee Cour2021-07-091-6/+19
| | | | | | | | | (#18457) * runnableExamples now show originating location in stacktraces on failure * PRTEMP * fix indentation inside multiline strings
* followup #18362: make `UnusedImport` work robustly (#18366)Timothee Cour2021-06-271-1/+1
| | | | * warnDuplicateModuleImport => hintDuplicateModuleImport * improve DuplicateModuleImport msg, add test
* validate rst field for :number-lines:, :status: (#18304)Andrey Makarov2021-06-201-0/+1
|
* docgen: move to shared RST state (fix #16990) (#18256)Andrey Makarov2021-06-201-83/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* fixes #18112 (#18165)Andreas Rumpf2021-06-031-2/+4
|
* docs: Latex generation improvements (#18141)Andrey Makarov2021-06-011-1/+1
| | | | | | | * docs: improve Latex generation * make it work on Windows + fix ] escaping * minor fixes with escapes and style
* docgen: escape special characters in titles (#18014)Andrey Makarov2021-05-151-2/+3
|
* `doc2tex`: generate docs to Latex (#17997)Andrey Makarov2021-05-141-8/+14
| | | | | * `doc2tex`: generate docs to Latex * address some comments
* fixes #17675 (#17981)Andreas Rumpf2021-05-091-1/+1
|
* docgen: get rid of ropes (#17939)Andrey Makarov2021-05-051-190/+146
|
* more strict RST inline markup parsing (#17827)Andrey Makarov2021-04-291-2/+5
| | | | | * more strict RST inline markup parsing * add test for unexpected bonus * introduce `roPreferMarkdown`
* `--filenames:abs|canonical|legacyRelProj` for filenames in compiler msgs ↵Timothee Cour2021-04-211-15/+0
| | | | | | | (replaces `--listfullpaths:on|off`) (#17746) * use canonicalImport for filename_magicSauce * --filenames:abs|canonical|magic * rename: magic => legacyRelProj
* -d:nimDebug: calls doAssert false instead of quit (#17739)Timothee Cour2021-04-171-1/+1
|
* fix #17615(runnableExamples silently ignored if placed after some code) (#17619)flywind2021-04-021-15/+18
| | | Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* enable syntax highlighting for inline code (#17585)Andrey Makarov2021-04-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * 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-11/+11
| | | | (#17054)
* fix https://github.com/nim-lang/RFCs/issues/352: show top-level import for ↵Timothee Cour2021-03-291-9/+16
| | | | | | | | | 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
* custom integer literals (#17489)Andreas Rumpf2021-03-241-1/+1
| | | | | | | * 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
* fix #16973 ; nim doc now shows correct, canonical import name in title (#16999)Timothee Cour2021-03-231-7/+18
| | | | * nim doc now shows correct import name in title
* fix #16901: sidebar groups now works with all routines, not just proc,func ↵Timothee Cour2021-03-191-1/+1
| | | | | | | (#17416) * fix #16901: sidebar groups now works with all routines, not just proc,func * fix tests
* Rst test check messages (fix #17280) (#17338)Andrey Makarov2021-03-171-2/+7
|
* fix RST parsing when no indent after enum.item (fix #17249) (#17257)Andrey Makarov2021-03-121-2/+3
|
* fix #13491 #17279 runnableExamples now don't get lost in translation (#17282)Timothee Cour2021-03-091-23/+42
| | | | | * fix #13491 runnableExamples rendering * fix a runnableExamples thanks to this bugfix
* RST heading improvements (fix #17091) (#17195)Andrey Makarov2021-03-021-6/+10
|
* fix code-block test bugs: fix #17183, fix ↵Timothee Cour2021-02-261-1/+7
| | | | | | | https://github.com/timotheecour/Nim/issues/620 (#17184) * fix code-block test bugs: fix #17183, fix https://github.com/timotheecour/Nim/issues/620 * cleanup
* make rst.nim use object variant (#17138)Andrey Makarov2021-02-221-2/+2
| | | | | | | * make rst.nim use object variant * add workaround * fix mistake
* stricter checks for RST headlines (#17089)Andrey Makarov2021-02-201-0/+1
|
* RST: implement footnotes and citations (#16960)Andrey Makarov2021-02-151-0/+1
| | | | | | | | | * 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>
* quote nim command on compile (#16954)n5m2021-02-071-1/+1
|
* remove conditionals on nimHasUserErrors, nimNoNilSeqs2, nimNoNilSeqs (#16861)Timothee Cour2021-01-291-2/+1
| | | | | | | | | * cleanup docs for type(nil) | type(nil); simplify nimHasUserErrors * simplify nimNoNilSeqs2 * simplify nimNoNilSeqs * fixup
* improve formatting of error message when runnableExamples fails (#16677)Timothee Cour2021-01-131-1/+6
|
* RST: implement internal targets (#16614)Andrey Makarov2021-01-111-1/+1
|
* misc cleanups (#16383)Timothee Cour2020-12-181-3/+4
|
* fix #16248 forward --lib to runnableExamples (#16350)Timothee Cour2020-12-141-1/+2
|
* put both funcs and procs under the same section in the documentation (#16301)Miran2020-12-091-8/+2
| | | | | * both funcs and procs are under the same section in the documentation * update the test
* fix export links in the documentation (#16114) [backport:1.4]Miran2020-11-241-5/+9
| | | | | * fix export links in the documentation * fix `len` problem
* fix #15916 (#15917) [backport]flywind2020-11-121-2/+4
| | | | | | | * fix #15916 * add testcase for #15916 * add comments
* rst: add support for markdown tables (#15854)Miran2020-11-101-0/+1
| | | | | | | * rst: add support for markdown tables * change template into proc * don't create unnecessary `seq[string]`
* Use modern enums in compiler (#15775)cooldome2020-11-021-1/+1
|
* [backport: 1.4] Better linebreaks (#15658)Miran2020-10-221-10/+4
|
* add Source+Edit links on top of every docgend file (#15642)Timothee Cour2020-10-221-22/+24
|
* fixes bootstrapping for any machine that has a Nim already installed ↵Andreas Rumpf2020-10-201-11/+11
| | | | [backport:1.4] (#15660)
* even more "eg" fixes [ci skip]narimiran2020-10-201-3/+3
|
* group procs of the same name in TOC (#15487)Miran2020-10-051-7/+26
| | | | | | | | | | | * 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
* 'koch temp' bugfixAraq2020-09-231-2/+2
|
* Expand hoisted default params in sem (#15270)Clyybber2020-09-051-4/+4
| | | | | | | | | * 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
* Big compiler Cleanup (#14777)Clyybber2020-08-281-33/+12
|