Commit Graph

84 Commits

Author SHA1 Message Date
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
patrick dw
15e7fe787a renamed writeln to writeLine in lib 2015-06-19 01:02:22 -05: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
2b4e233510 Merge branch 'devel' of https://github.com/Araq/Nim into devel 2015-04-20 11:44:54 +02:00
Araq
5cea6807e1 fixes #2476 2015-04-19 02:43:19 +02:00
Oleh Prypin
81d2be4aa6 Make RST recognize hyperlinks with two underscores
Fixes #2538
2015-04-13 19:51:27 +03:00
Araq
3c54a4a438 docutils are gcsafe 2015-04-04 01:19:31 +02:00
Araq
f6ff01572e breaking change: 'concept' is now a keyword and used instead of 'generic' 2015-03-23 13:10:18 +01:00
def
0255876055 rstgen: Unique reference names in TOC
- Fixes #2269
- Keeps track of higher level section to create unique reference names
2015-03-13 01:32:23 +01:00
Hans Raaf
b902ea887b Replaced deprecated repeatStr() with repeat(). 2015-03-04 03:44:09 +01:00
Hans Raaf
58186f6c1d Replaced deprecated repeatChar() with repeat() or spaces(). 2015-03-04 03:30:43 +01:00
Federico Ceratto
657dca5c3b Fix typos 2015-02-15 16:20:32 +00:00
Dustin Lacewell
9e4ee03c2c Replace other common expressions with defined variable 2015-01-12 11:20:26 -08:00
Dustin Lacewell
ff941fd489 Add named anchor links to procs in the documentation index 2015-01-12 10:53:02 -08:00
Nick Greenfield
fb93cee95d Improved nimdoc styling.
This updates the inlined CSS in nimdoc.cfg, adds several helper classes
(and a few divs) to the generated HTML (some in nimdoc.cfg, one in
rstgen.nim), and tweaks the anchor linking scheme for headers in
rstgen.nim.
2014-12-19 21:08:11 -05:00
Araq
85cc5a6a1f destuctors are experimental; 'func' is now a keyword 2014-12-10 01:57:08 +01:00
Araq
5979d35ab2 Merge branch 'devel' of https://github.com/Araq/Nimrod into devel 2014-12-08 22:35:21 +01:00
Dominik Picheta
898501d9d1 Moved smiliey format to config hash table. 2014-12-04 18:47:01 +00:00
Araq
e27ab36731 implements 'defer' 2014-12-04 10:12:32 +01:00
Araq
80b8361187 smileys configurable; safer image attribute handling 2014-11-29 13:55:30 +01:00
Araq
8349cee613 fixes #1055 2014-11-16 20:32:05 +01:00
Grzegorz Adam Hankiewicz
a7aa2de166 Merge branch 'pr_adds_code_directive_to_rst' into pr_bigbreak_adds_code_directive_to_rst
Conflicts:
	doc/tut2.txt
	lib/packages/docutils/rstgen.nim
	lib/system.nim
2014-11-03 15:50:05 +01:00
Grzegorz Adam Hankiewicz
2df195c8e2 Fixes line numbering. 2014-10-02 00:59:07 +02:00
Araq
0c25f7e202 support nimrod as an alias for nim for compatibility (nimforum!) 2014-09-17 02:37:05 +02:00
Araq
5946747970 updated the compiler to use the new symbol names 2014-08-28 23:48:42 +02:00
Araq
d05df2173b Nimrod renamed to Nim 2014-08-28 09:50:51 +02:00
Araq
2f43fdb837 renamefest 2014-08-23 01:43:49 +02:00
Araq
dbf9117c56 the big renamefest: first steps 2014-08-22 23:54:26 +02:00
Araq
057b53e139 'lambda' is no keyword anymore 2014-08-08 02:24:19 +02:00
Grzegorz Adam Hankiewicz
69949c07b7 Escapes properly code blocks without highlite support. 2014-07-28 23:22:39 +02:00
Grzegorz Adam Hankiewicz
b287f13d4a Handles :file: option for code blocks to avoid warnings. 2014-07-26 14:39:01 +02:00
Grzegorz Adam Hankiewicz
0dbec5a278 Adds support for the `.. code::` rst directive.
This modifies the existing ``.. code-block::`` to be treated as spec
extension with a specific default language syntax. Also implements line
numbering.
2014-07-19 13:56:42 +02:00
Grzegorz Adam Hankiewicz
489d7e526d Computes TIndexEntry hash without temporary strings. 2014-05-24 11:52:56 +02:00
Grzegorz Adam Hankiewicz
7f090983e9 Adds colon to symbols in the index.
The colon makes it easier to get a unique match searching for symbols
using words which may also appear as substrings or elsewhere.
2014-04-21 23:37:12 +02:00
Grzegorz Adam Hankiewicz
51949fd373 Inserts the title index term at the beginning of the buffer. 2014-04-21 23:27:26 +02:00
Grzegorz Adam Hankiewicz
bd29e007be Removes text TOCs from the symbol index. 2014-04-21 21:07:26 +02:00
Grzegorz Adam Hankiewicz
8b1430811a Assigns default title to module documentation. 2014-04-21 21:07:26 +02:00
Grzegorz Adam Hankiewicz
d31638a103 Reduces length of lines to remove compilation warnings. 2014-04-21 21:07:26 +02:00
Grzegorz Adam Hankiewicz
ed713a8f5e Fixes title and subtitle not setting the current section. 2014-04-21 21:07:25 +02:00
Grzegorz Adam Hankiewicz
831e12d8f8 Fixes repeated index terms leading to same HTML anchor.
Instead of a hash for the rst node tree (which will always be the same)
a simple counter table is used.
2014-04-21 21:07:25 +02:00
Grzegorz Adam Hankiewicz
7808ad97a5 Indexes tocs of documents even if they don't show any. 2014-04-21 21:05:39 +02:00
Grzegorz Adam Hankiewicz
fdf4bf2cfd Generates quick jump list to modules. 2014-04-21 21:05:39 +02:00
Grzegorz Adam Hankiewicz
130a46df7d Generates quick jump list to documentation files. 2014-04-21 21:05:39 +02:00
Grzegorz Adam Hankiewicz
69fb40bd84 Refactors adhoc table of sequences into TIndexedDocs type. 2014-04-21 21:05:38 +02:00
Grzegorz Adam Hankiewicz
b1f26ae542 Picks the correct symbol text for theindex embedded tocs. 2014-04-21 21:05:38 +02:00
Grzegorz Adam Hankiewicz
5962119feb Moves TOC index entry generation to rstgen module.
We want it there so that index entries appear in the same order as they
are found in the input text.
2014-04-21 21:05:38 +02:00