summary refs log tree commit diff stats
path: root/lib/packages/docutils/rstgen.nim
Commit message (Collapse)AuthorAgeFilesLines
* bootstrap the compiler with nimPreviewSlimSystem (#20176)ringabout2022-08-091-0/+5
| | | | | * bootstrap the compiler with nimPreviewSlimSystem * threads
* Highlight Nim default in Markdown code in .nim (#20110)Andrey Makarov2022-07-311-1/+1
| | | Highlight Nim by default in Markdown code in .nim
* RST: improve simple tables (#19859)Andrey Makarov2022-06-041-17/+38
| | | | | | | * RST: improve simple tables * nim 1.0 gotchas * Still allow legacy boundaries like `----`
* Fix bug 27 of #17340 (#19433)Andrey Makarov2022-02-071-14/+3
| | | | | | Fixes silent disappearance of Markdown (pseudo-)link when it's detected as unsafe protocol. Now it will be converted to plain text in spirit of [the specification](https://spec.commonmark.org/0.30/#links). For that sake the check for protocol is added to rst.nim also.
* RST: allow empty number-lines directives just like it was done for a decade; ↵Andreas Rumpf2022-01-221-1/+2
| | | | all my documents rely on this feature [backport (#19431)
* fixes a possible 'javascript:' protocol exploit [backport:1.0] (#19134)Andreas Rumpf2021-12-101-1/+14
| | | | | | | | | | | | | * fixes a possible 'javascript:' protocol exploit [backport:1.0] * add tests * Update tests/stdlib/trstgen.nim * add the same logic for hyperlinks * move the logic into a proc Co-authored-by: narimiran <narimiran@disroot.org>
* implement RST & Markdown quote blocks (#19147)Andrey Makarov2021-11-231-2/+27
| | | | | | | * implement RST & Markdown quote blocks * compile with nim 1.0 * Fix indentation
* fix nimindexterm in rst2tex/doc2tex [backport] (#19106)Andrey Makarov2021-11-091-1/+1
| | | | | * fix nimindexterm (rst2tex/doc2tex) [backport] * Add support for indexing in rst
* docgen: implement doc link resolution in current module (#18642)Andrey Makarov2021-10-281-8/+19
|
* rst: minor fixes (#18960)Andrey Makarov2021-10-061-1/+1
|
* with this patch :idx: can be used for the index generation for LaTeX (#18946)Andreas Rumpf2021-10-031-1/+1
|
* [minor] reduce `substr` (#18611)flywind2021-07-301-1/+1
| | | | | | | | | * minor * correct * unify the type of addrLen * Update lib/packages/docutils/rstgen.nim
* rst: add missing line/column info for some warnings (#18383)Andrey Makarov2021-07-201-19/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* rm redundant blank lines before literal blocks (#18465)Andrey Makarov2021-07-081-1/+1
|
* validate rst field for :number-lines:, :status: (#18304)Andrey Makarov2021-06-201-8/+22
|
* docs: Latex generation improvements (#18141)Andrey Makarov2021-06-011-61/+79
| | | | | | | * docs: improve Latex generation * make it work on Windows + fix ] escaping * minor fixes with escapes and style
* `doc2tex`: generate docs to Latex (#17997)Andrey Makarov2021-05-141-29/+31
| | | | | * `doc2tex`: generate docs to Latex * address some comments
* add RST highlighting for command line / shells (also fixes #16858) (#17789)Andrey Makarov2021-04-211-4/+14
|
* restyle RST option lists (#17637)Andrey Makarov2021-04-101-6/+12
| | | | | | | | | | | | | * WIP: restyle RST option lists * apply similar style to Latex * fix tests * minor visual tweaks * update tests * remove leftover comments
* fix :number-lines: regression (#17639)Andrey Makarov2021-04-051-1/+1
|
* enable syntax highlighting for inline code (#17585)Andrey Makarov2021-04-021-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* remove docutils.nimble (not a real nimble package, and affected canonical ↵Timothee Cour2021-03-291-2/+0
| | | | | | | imports) (#17544) * remove docutils.nimble (not a real nimble package, and affected canonical imports) * cleanup redundant references
* Rst test check messages (fix #17280) (#17338)Andrey Makarov2021-03-171-4/+4
|
* fix RST parsing when no indent after enum.item (fix #17249) (#17257)Andrey Makarov2021-03-121-2/+6
|
* RST heading improvements (fix #17091) (#17195)Andrey Makarov2021-03-021-3/+3
|
* fix code-block test bugs: fix #17183, fix ↵Timothee Cour2021-02-261-1/+4
| | | | | | | 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-26/+24
| | | | | | | * make rst.nim use object variant * add workaround * fix mistake
* RST: implement footnotes and citations (#16960)Andrey Makarov2021-02-151-5/+44
| | | | | | | | | * 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>
* rst: single backticks now render correctly in both rst2html and github (#17028)Timothee Cour2021-02-131-0/+1
| | | | | | * rst: `` => ` * support default-role in rst2html * update docstyle regarding single vs double backticks
* RST: implement internal targets (#16614)Andrey Makarov2021-01-111-53/+82
|
* RST: improve line blocks (#16518)Andrey Makarov2020-12-311-2/+14
|
* RST: implement admonitions (#16438)Andrey Makarov2020-12-271-0/+24
|
* doc/rst2html: some few fixes for enumerated and bullet lists (#16295)Andrey Makarov2020-12-141-3/+51
| | | | | | | | | | | | * fix bullet/enumarated lists with many blank lines * fix enumerated list parsing * fix parse failure when next line after list empty * implement arbitrary start of enumerator * check that enumerators are in order * remove redundant start=x if x=1 or a * add some doc on implemented features * update start in rst_examples.rst * allow upper-case letters + more docs
* RST tables: fix latex col number; allow less than three of `=` (#16040)Andrey Makarov2020-12-041-1/+2
|
* fixed article duplication typos (#16216)ihlec2020-12-021-1/+1
|
* move rest of tests to testament (#16140)flywind2020-11-271-6/+0
| | | | * move rest of tests to testament * Update tests/stdlib/tsums.nim
* rst: add support for markdown tables (#15854)Miran2020-11-101-1/+1
| | | | | | | * rst: add support for markdown tables * change template into proc * don't create unnecessary `seq[string]`
* fixes bootstrapping for any machine that has a Nim already installed ↵Andreas Rumpf2020-10-201-7/+6
| | | | [backport:1.4] (#15660)
* fix #6430, support `:target:` for images (#15379)Miran2020-09-211-0/+12
|
* Add rstgen.rstToLatex convenience proc for renderRstToOut and ↵Juan Carlos2020-06-121-0/+11
| | | | initRstGenerator with outLatex output, see https://github.com/nim-lang/fusion/pull/11#issuecomment-641804899 (#14629)
* Propagate the outDir to rstgen to fix hrefs for modules in subdirs (#14479)Kaushal Modi2020-05-281-3/+13
|
* docgen: mangling using _. instead of @@ to avoid issue (#14454)Timothee Cour2020-05-261-2/+2
|
* docgen: fix #14448 show @@ as .. in href text (#14451)Timothee Cour2020-05-251-1/+6
|
* fix some issues with --backend (#14363)Timothee Cour2020-05-161-1/+1
| | | | | * fix some issues with --backend * fix https://github.com/timotheecour/Nim/issues/175; improve upon #14306
* Make --backend:cpp|js work for :test: code-blocks as well (#14306)Kaushal Modi2020-05-111-1/+1
| | | | | | | | | Continues https://github.com/nim-lang/Nim/commit/9502e39b634eea8e04f07ddc110b466387f42322 Ref: - https://github.com/nim-lang/Nim/commit/9502e39b634eea8e04f07ddc110b466387f42322#commitcomment-39087584 - https://github.com/nim-lang/Nim/pull/14278 Fixes https://github.com/nim-lang/Nim/issues/13129 .
* Fix #13631 (#13789)Juan Carlos2020-03-291-2/+2
|
* fix several typos in documentation and comments (#12553)Nindaleth2019-10-301-1/+1
|
* Fix word wrappingJjp1372019-10-221-7/+11
|
* Fix many broken linksJjp1372019-10-221-7/+7
| | | | | | Note that contrary to what docgen.rst currently says, the ids have to match exactly or else most web browsers will not jump to the intended symbol.
* use system.move instead of system.shallowCopy if the GC mode requires itAndreas Rumpf2019-10-041-5/+8
|