Commit graph

97 commits

Author SHA1 Message Date
ihlec
5c23ba7545
fixed article duplication typos (#16216) 2020-12-02 09:15:29 +01:00
flywind
bc1db0d6f1
move rest of tests to testament (#16140)
* move rest of tests to testament
* Update tests/stdlib/tsums.nim
2020-11-27 20:47:49 +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
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
Miran
4645183272
fix #6430, support :target: for images (#15379) 2020-09-21 17:01:12 +02:00
Juan Carlos
82e424189e
Add rstgen.rstToLatex convenience proc for renderRstToOut and initRstGenerator with outLatex output, see https://github.com/nim-lang/fusion/pull/11#issuecomment-641804899 (#14629) 2020-06-12 10:51:55 +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
38cb277653
docgen: mangling using _. instead of @@ to avoid issue (#14454) 2020-05-26 10:08:35 +02:00
Timothee Cour
55758920f4
docgen: fix #14448 show @@ as .. in href text (#14451) 2020-05-25 18:16:00 -07: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
Kaushal Modi
86669ef5b4
Make --backend:cpp|js work for :test: code-blocks as well (#14306)
Continues 9502e39b63

Ref:
- 9502e39b63 (commitcomment-39087584)
- https://github.com/nim-lang/Nim/pull/14278

Fixes https://github.com/nim-lang/Nim/issues/13129 .
2020-05-11 20:45:35 +02:00
Juan Carlos
8c719fce54
Fix #13631 (#13789) 2020-03-29 14:39:58 +02:00
Nindaleth
34dbc5699e fix several typos in documentation and comments (#12553) 2019-10-30 09:08:45 +01:00
Jjp137
3ad48069d3 Fix word wrapping 2019-10-22 17:59:12 -07:00
Jjp137
93461aee34 Fix many broken links
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.
2019-10-22 17:59:12 -07:00
Andreas Rumpf
60d64d1aef use system.move instead of system.shallowCopy if the GC mode requires it 2019-10-04 09:48:45 +02:00
Federico Ceratto
39290cf88c Fix spellings (#12277) [backport] 2019-09-27 07:02:54 +02:00
Araq
87a2ced1ba there is only one style -- my style 2019-07-10 19:17:06 +02:00
Miran
8cf97908cc
document proper imports, fixes #8164 (#10698) 2019-02-19 12:49:09 +01:00
Araq
c3d80647ae docgen: render 'interpreted text' the same as inline literals for markdown compat 2019-01-11 22:17:43 +01:00
Kaushal Modi
903886396d Don't prevent ',' from getting escaped in theindex.html
- Enable escaping of links in theindex.html
- Fixes https://github.com/nim-lang/Nim/issues/9107.
- Second part of the fix for https://github.com/nim-lang/Nim/issues/9097.
2018-09-28 15:39:22 -04:00
Araq
7d9c5be333 nim doc: simplifiy index generation 2018-09-13 20:28:51 +02:00
Araq
b9ed684dd2 index generation for docgen knows about subdirectories; index knows about enum values; fixes import statement for runnableExamples 2018-09-13 01:05:51 +02:00
Araq
64517445ea even more strict isNil handling for strings/seqs in order to detect bugs 2018-08-22 12:35:46 +02:00
Andreas Rumpf
dae5450947 WIP: disallow 'nil' for strings and seqs 2018-08-13 11:41:33 +02:00
Araq
babd31360a fixes more nil string bugs 2018-08-08 18:22:48 +02:00
Ray Imber
060871e64a Better doc search (#8260)
* Modified the doc generation to produce a custom data attribute to allow for better search functionality

* Implemented fuzzy matching for the Nim Doc search instead of the simple regex match.

* Fix to the WordBoundry state transition from code review with @Varriount. Also removed silly testing template that is no longer used.

* Update fuzzysearch.nim

* Update fuzzysearch.nim

* Update fuzzysearch.nim

* Update dochack.nim

* Update dochack.nim
2018-07-20 04:58:42 -05:00
Andreas Rumpf
73799903ee removed global variable from rstgen.nim 2018-05-27 23:38:49 +02:00
Dominik Picheta
85b7d8fcc4 Rstgen/xml tree fixes (#7823)
* Don't prefix lang names with "lang" in rstgen.

* Implements ability to render xmltree w/o \n. Fixes <> for `data-*` attrs.

* Various rstgen fixes.

* Fixes security vulnerabilities due to not escaping some code.
* Adds <video> support and improve `.. image:: ` directive.

* Adds comment as requested.
2018-05-23 16:28:53 +02:00
Andreas Rumpf
68a63b3407 RST package: don't use obsolete toLower proc 2018-04-29 01:08:37 +02:00
Andreas Rumpf
ed9c28484a docutils: make ':test:' work without argument 2018-04-15 22:16:07 +02:00
Araq
5d2e86ea1a the documentation generator now supports ':test:' for the testing of test snippets 2017-11-28 01:15:33 +01:00
Araq
8d1a5dc8e7 the documentation generator now supports system.runnableExamples 2017-11-26 02:51:11 +01:00
Silvio
d837ef177c Add possibility to get language class to listings (#6705)
Add the possibility to add class `lang<Name>` to code listings.
Needed for restricting `run` to nim code (see https://github.com/nim-lang/nimforum/pull/111 )
2017-11-08 11:12:05 +01:00
Araq
742f43e572 fixes #6609; 'if' expressions support multiple statements; minor breaking change 2017-11-05 01:26:04 +01:00
Arne Döring
000b8afd26 Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
Simon Krauter
a42801d100 Make countLines() the same as len(splitLines(s)) (#5470)
The result of countLines() is now increased by 1 compared to the old
version.
Fixes #5460.
2017-03-03 01:31:17 +01:00
Araq
3dfc866710 docgen: working search feature 2016-09-09 20:42:02 +02:00
Araq
37c3c0033d generated theindex.html is valid html 2016-09-09 16:16:58 +02:00
Andreas Rumpf
981974ab11 Merge pull request #3831 from ephja/nimrod-to-nim
nimrod -> nim
2016-02-06 15:24:09 +01:00
Erik Johansson Andersson
f8d98700ac nimrod -> nim 2016-02-05 19:11:43 +01:00
Felix Krause
facd4c6f19 RST: Output <object> for SVG images in HTML 2016-02-02 20:20:59 +01:00
Felix Krause
708b9f90b7 Made docgen emit valid XML by default 2016-01-11 22:52:59 +01:00
Araq
8be9e46403 udpated the compiler and tester to use getOrDefault 2015-10-13 14:10:33 +02:00
singularperturbation
4c1611fc13 Fix for image directive with periods
Saw in https://github.com/nim-lang/nimforum/issues/41 that there was an
issue in rendering inline images.  Traced back through rstgen and found
that it was not counting something like:

`.. image:: http://i.imgur.com/oCem13Y.png` as valid since it contained
a period, and this wasn't in the set of valid characters, so the empty
string is returned by default.

Added a period to the allowable characters, and now renders correctly.

Test case:
```
import rst, rstgen, strtabs

var docConfig: StringTableRef

docConfig = rstgen.defaultConfig()
docConfig["doc.smiley_format"] = "/images/smilieys/$1.png"

proc rstToHtml(content: string): string =
    result = rstgen.rstToHtml(content, {roSupportSmilies,roSupportMarkdown},
                              docConfig)

var a: string = rstToHtml(".. image:: http://i.imgur.com/oCem13Y.png")
echo a
```
2015-08-02 14:16:53 -05:00
Araq
f7bdc205c7 documentation generator emits configurable html for code listings 2015-07-14 01:37:09 +02:00
pdw
7616790515 lib/packages/docutils - Dropped 'T' from types 2015-06-04 13:17:10 +02:00
Oleh Prypin
22db40e5e4 Turn some test outputs into actual tests 2015-04-21 15:59:32 +03:00
Oleh Prypin
32109a7867 Don't run non-test code when defined(testing) 2015-04-21 14:37:29 +03:00
Araq
5cea6807e1 fixes #2476 2015-04-19 02:43:19 +02:00