summary refs log tree commit diff stats
path: root/tests/array/tarraycons.nim
diff options
context:
space:
mode:
authorsingularperturbation <sloanes.k@gmail.com>2015-08-02 14:16:49 -0500
committersingularperturbation <sloanes.k@gmail.com>2015-08-02 14:16:53 -0500
commit4c1611fc13bbdc516fb08f1e12bf3a873489d705 (patch)
treedc464a9b8f17fff70c655e1e61ef2795d7731f3b /tests/array/tarraycons.nim
parentb77475bd190e6a54effeae87f1e50da516bfee20 (diff)
downloadNim-4c1611fc13bbdc516fb08f1e12bf3a873489d705.tar.gz
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
```
Diffstat (limited to 'tests/array/tarraycons.nim')
0 files changed, 0 insertions, 0 deletions
k K. Agaram <vc@akkartik.com> 2015-04-06 12:07:00 -0700 1025 - switch syntax highlighting to support c++ version' href='/akkartik/mu/commit/mu.vim?h=main&id=c517316b09e35eee95cdae1b44f7c9357f9bddf6'>c517316b ^
b38d7fff ^
a6d9bd9b ^


e3894819 ^
b38d7fff ^
a6d9bd9b ^



1ae4e0d9 ^
a6d9bd9b ^
31a9d39e ^

a6d9bd9b ^
2e534c0e ^
1ae4e0d9 ^
b94f150a ^
1ae4e0d9 ^
fbf0536d ^


fbf0536d ^
10f49c64 ^
b38d7fff ^
e3894819 ^
1ae4e0d9 ^
fc2046a1 ^
1ead3562 ^
38f0b91a ^
1ead3562 ^
70f70118 ^
04afb4b0 ^
426009da ^
b38d7fff ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68