summary refs log tree commit diff stats
path: root/lib/packages/docutils/rstast.nim
Commit message (Collapse)AuthorAgeFilesLines
* Markdown indented code blocks (#20473)Andrey Makarov2022-10-051-7/+7
| | | | | | | | | | | | | | | | | | | | | | | * Implement Markdown indented code blocks Additional indentation of 4 spaces makes a block an "indented code block" (monospaced text without syntax highlighting). Also `::` RST syntax for code blocks is disabled. So instead of ```rst see:: Some code ``` the code block should be written as ```markdown see: Some code ``` * Migrate RST literal blocks :: to Markdown's ones
* Implement Markdown definition lists (+ migration) (#20333)Andrey Makarov2022-09-111-1/+1
| | | | | | | | | | | | | | | Implements definition lists Markdown extension adopted in a few implementations including: * [Pandoc]( https://pandoc.org/MANUAL.html#definition-lists) * [kramdown]( https://kramdown.gettalong.org/quickref.html#definition-lists) * [PHP extra Markdown]( https://michelf.ca/projects/php-markdown/extra/#def-list) Also affected files have been migrated. RST definition lists are turned off for Markdown: this solves the problem of broken formatting mentioned in https://github.com/nim-lang/Nim/pull/20292.
* Implement Pandoc Markdown concise link extension (#20304)Andrey Makarov2022-09-041-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement Pandoc Markdown concise link extension This implements https://github.com/nim-lang/Nim/issues/20127. Besides reference to headings we also support doing references to Nim symbols inside Nim modules. Markdown: ``` Some heading ------------ Ref. [Some heading]. ``` Nim: ``` proc someFunction*() ... ... ## Ref. [someFunction] ``` This is substitution for RST syntax like `` `target`_ ``. All 3 syntax variants of extension from Pandoc Markdown are supported: `[target]`, `[target][]`, `[description][target]`. This PR also fixes clashes in existing files, particularly conflicts with RST footnote feature, which does not work with this PR (but there is a plan to adopt a popular [Markdown footnote extension](https://pandoc.org/MANUAL.html#footnotes) to make footnotes work). Also the PR fixes a bug that Markdown links did not work when `[...]` section had a line break. The implementation is straightforward since link resolution did not change w.r.t. RST implementation, it's almost only about new syntax addition. The only essential difference is a possibility to add a custom link description: form `[description][target]` which does not have an RST equivalent. * fix nim 1.0 gotcha
* bootstrap the compiler with nimPreviewSlimSystem (#20176)ringabout2022-08-091-0/+4
| | | | | * bootstrap the compiler with nimPreviewSlimSystem * threads
* RST: improve simple tables (#19859)Andrey Makarov2022-06-041-0/+13
| | | | | | | * RST: improve simple tables * nim 1.0 gotchas * Still allow legacy boundaries like `----`
* implement RST & Markdown quote blocks (#19147)Andrey Makarov2021-11-231-1/+8
| | | | | | | * implement RST & Markdown quote blocks * compile with nim 1.0 * Fix indentation
* docgen: implement doc link resolution in current module (#18642)Andrey Makarov2021-10-281-0/+3
|
* rst: minor fixes (#18960)Andrey Makarov2021-10-061-2/+2
|
* rst: add missing line/column info for some warnings (#18383)Andrey Makarov2021-07-201-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* docs: Latex generation improvements (#18141)Andrey Makarov2021-06-011-1/+17
| | | | | | | * docs: improve Latex generation * make it work on Windows + fix ] escaping * minor fixes with escapes and style
* add RST highlighting for command line / shells (also fixes #16858) (#17789)Andrey Makarov2021-04-211-1/+3
|
* rst indentation fixes (ref #17340) (#17715)Andrey Makarov2021-04-151-8/+10
|
* restyle RST option lists (#17637)Andrey Makarov2021-04-101-2/+2
| | | | | | | | | | | | | * WIP: restyle RST option lists * apply similar style to Latex * fix tests * minor visual tweaks * update tests * remove leftover comments
* enable syntax highlighting for inline code (#17585)Andrey Makarov2021-04-021-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | * 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 heading improvements (fix #17091) (#17195)Andrey Makarov2021-03-021-5/+7
|
* make rst.nim use object variant (#17138)Andrey Makarov2021-02-221-21/+49
| | | | | | | * make rst.nim use object variant * add workaround * fix mistake
* RST: implement footnotes and citations (#16960)Andrey Makarov2021-02-151-3/+8
| | | | | | | | | * 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-5/+9
|
* RST: improve line blocks (#16518)Andrey Makarov2020-12-311-2/+3
|
* RST: implement admonitions (#16438)Andrey Makarov2020-12-271-2/+20
|
* doc/rst2html: some few fixes for enumerated and bullet lists (#16295)Andrey Makarov2020-12-141-1/+1
| | | | | | | | | | | | * 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: 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]`
* document proper imports, fixes #8164 (#10698)Miran2019-02-191-0/+2
|
* docgen: support markdown link syntax; enable markdown extensionsAraq2019-01-111-0/+3
|
* WIP: disallow 'nil' for strings and seqsAndreas Rumpf2018-08-131-2/+2
|
* remove deprecated stuff from the stdlib; introduce better deprecation warningsAraq2018-05-051-3/+0
|
* lib/packages/docutils - Dropped 'T' from typespdw2015-06-041-13/+16
|
* docutils are gcsafeAraq2015-04-041-41/+42
|
* Replaced deprecated repeatChar() with repeat() or spaces().Hans Raaf2015-03-041-5/+5
|
* updated the compiler to use the new symbol namesAraq2014-08-281-2/+2
|
* Nimrod renamed to NimAraq2014-08-281-1/+1
|
* Modify renderRstToJson to use the json libraryflaviut2014-04-051-18/+17
|
* Add renderRstToJson in docutilsflaviut2014-04-051-0/+25
|
* case consistency: next stepsAraq2013-12-291-12/+12
|
* case consistency part 4Araq2013-12-271-12/+12
|
* case consistency part 1Araq2013-12-271-2/+2
|
* Adds docutils modules to lib index, fixes :idx: markers.Grzegorz Adam Hankiewicz2013-06-091-1/+1
|
* Moved packages to lib directory.Dominik Picheta2013-02-251-0/+288