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
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
Dominik Picheta
898501d9d1
Moved smiliey format to config hash table.
2014-12-04 18:47:01 +00: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
5946747970
updated the compiler to use the new symbol names
2014-08-28 23:48:42 +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
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
Grzegorz Adam Hankiewicz
400dd20858
Splits index into documents and APIs.
2014-04-21 21:05:38 +02:00
Grzegorz Adam Hankiewicz
1d0175ed27
Adds explicit titles to documentation index.
2014-04-21 21:05:37 +02:00
Araq
3e25d5f247
merged better html links #850
2014-04-08 01:19:15 +02:00
Araq
73c6efdf66
'nil' as a statement is deprecated, use an empty 'discard' instead
2014-01-19 16:54:59 +01:00
Araq
36afdca87f
resolved conflicts with master
2014-01-18 01:16:45 +01:00
Grzegorz Adam Hankiewicz
077b8327ec
Documents rstgen index related procs.
2014-01-15 22:23:22 +01:00
Araq
438703f59e
case consistency: next steps
2013-12-29 01:13:51 +01:00
Araq
92b8fac94a
case consistency part 4
2013-12-27 23:10:36 +01:00
Araq
2df9b442c6
case consistency part 1
2013-12-27 15:48:53 +01:00
Grzegorz Adam Hankiewicz
f33f15afe8
Adds docstring to rstgen.defaultConfig.
2013-12-23 19:25:53 +01:00
Grzegorz Adam Hankiewicz
e0d6a1cec1
Adds some docstrings to rstgen.
2013-12-18 21:22:22 +01:00