git.iko.soy/typeable/pandoc
on master help sign in
Merge pull request #4573 from expipiplus1/haddock-links
7f258cdJohn MacFarlane
src/Text/Pandoc/Writers/Haddock.hs+1−1
@@ -124,7 +124,7 @@ blockToHaddock opts (Table _ blkCapt specs thead tbody tfoot) = do
124 tbl <- gridTable opts blockListToHaddock
124 tbl <- gridTable opts blockListToHaddock
125 (all null headers) (map (const AlignDefault) aligns)
125 (all null headers) (map (const AlignDefault) aligns)
126 widths headers rows
126 widths headers rows
127− return $ prefixed "> " (tbl $$ blankline $$ caption'') $$ blankline
127+ return $ (tbl $$ blankline $$ caption'') $$ blankline
128blockToHaddock opts (BulletList items) = do
128blockToHaddock opts (BulletList items) = do
129 contents <- mapM (bulletListItemToHaddock opts) items
129 contents <- mapM (bulletListItemToHaddock opts) items
130 return $ (if isTightList items then vcat else vsep) contents <> blankline
130 return $ (if isTightList items then vcat else vsep) contents <> blankline
test/tables.haddock+70−70
@@ -1,90 +1,90 @@
1Simple table with caption:
1Simple table with caption:
2
2
3−> +-------+------+--------+---------+
3++-------+------+--------+---------+
4−> | Right | Left | Center | Default |
4+| Right | Left | Center | Default |
5−> +=======+======+========+=========+
5++=======+======+========+=========+
6−> | 12 | 12 | 12 | 12 |
6+| 12 | 12 | 12 | 12 |
7−> +-------+------+--------+---------+
7++-------+------+--------+---------+
8−> | 123 | 123 | 123 | 123 |
8+| 123 | 123 | 123 | 123 |
9−> +-------+------+--------+---------+
9++-------+------+--------+---------+
10−> | 1 | 1 | 1 | 1 |
10+| 1 | 1 | 1 | 1 |
11−> +-------+------+--------+---------+
11++-------+------+--------+---------+
12−>
12+
13−> Demonstration of simple table syntax.
13+Demonstration of simple table syntax.
14
14
15Simple table without caption:
15Simple table without caption:
16
16
17−> +-------+------+--------+---------+
17++-------+------+--------+---------+
18−> | Right | Left | Center | Default |
18+| Right | Left | Center | Default |
19−> +=======+======+========+=========+
19++=======+======+========+=========+
20−> | 12 | 12 | 12 | 12 |
20+| 12 | 12 | 12 | 12 |
21−> +-------+------+--------+---------+
21++-------+------+--------+---------+
22−> | 123 | 123 | 123 | 123 |
22+| 123 | 123 | 123 | 123 |
23−> +-------+------+--------+---------+
23++-------+------+--------+---------+
24−> | 1 | 1 | 1 | 1 |
24+| 1 | 1 | 1 | 1 |
25−> +-------+------+--------+---------+
25++-------+------+--------+---------+
26
26
27Simple table indented two spaces:
27Simple table indented two spaces:
28
28
29−> +-------+------+--------+---------+
29++-------+------+--------+---------+
30−> | Right | Left | Center | Default |
30+| Right | Left | Center | Default |
31−> +=======+======+========+=========+
31++=======+======+========+=========+
32−> | 12 | 12 | 12 | 12 |
32+| 12 | 12 | 12 | 12 |
33−> +-------+------+--------+---------+
33++-------+------+--------+---------+
34−> | 123 | 123 | 123 | 123 |
34+| 123 | 123 | 123 | 123 |
35−> +-------+------+--------+---------+
35++-------+------+--------+---------+
36−> | 1 | 1 | 1 | 1 |
36+| 1 | 1 | 1 | 1 |
37−> +-------+------+--------+---------+
37++-------+------+--------+---------+
38−>
38+
39−> Demonstration of simple table syntax.
39+Demonstration of simple table syntax.
40
40
41Multiline table with caption:
41Multiline table with caption:
42
42
43−> +----------+---------+-----------+--------------------------+
43++----------+---------+-----------+--------------------------+
44−> | Centered | Left | Right | Default aligned |
44+| Centered | Left | Right | Default aligned |
45−> | Header | Aligned | Aligned | |
45+| Header | Aligned | Aligned | |
46−> +==========+=========+===========+==========================+
46++==========+=========+===========+==========================+
47−> | First | row | 12.0 | Example of a row that |
47+| First | row | 12.0 | Example of a row that |
48−> | | | | spans multiple lines. |
48+| | | | spans multiple lines. |
49−> +----------+---------+-----------+--------------------------+
49++----------+---------+-----------+--------------------------+
50−> | Second | row | 5.0 | Here’s another one. Note |
50+| Second | row | 5.0 | Here’s another one. Note |
51−> | | | | the blank line between |
51+| | | | the blank line between |
52−> | | | | rows. |
52+| | | | rows. |
53−> +----------+---------+-----------+--------------------------+
53++----------+---------+-----------+--------------------------+
54−>
54+
55−> Here’s the caption. It may span multiple lines.
55+Here’s the caption. It may span multiple lines.
56
56
57Multiline table without caption:
57Multiline table without caption:
58
58
59−> +----------+---------+-----------+--------------------------+
59++----------+---------+-----------+--------------------------+
60−> | Centered | Left | Right | Default aligned |
60+| Centered | Left | Right | Default aligned |
61−> | Header | Aligned | Aligned | |
61+| Header | Aligned | Aligned | |
62−> +==========+=========+===========+==========================+
62++==========+=========+===========+==========================+
63−> | First | row | 12.0 | Example of a row that |
63+| First | row | 12.0 | Example of a row that |
64−> | | | | spans multiple lines. |
64+| | | | spans multiple lines. |
65−> +----------+---------+-----------+--------------------------+
65++----------+---------+-----------+--------------------------+
66−> | Second | row | 5.0 | Here’s another one. Note |
66+| Second | row | 5.0 | Here’s another one. Note |
67−> | | | | the blank line between |
67+| | | | the blank line between |
68−> | | | | rows. |
68+| | | | rows. |
69−> +----------+---------+-----------+--------------------------+
69++----------+---------+-----------+--------------------------+
70
70
71Table without column headers:
71Table without column headers:
72
72
73−> +-----+-----+-----+-----+
73++-----+-----+-----+-----+
74−> | 12 | 12 | 12 | 12 |
74+| 12 | 12 | 12 | 12 |
75−> +-----+-----+-----+-----+
75++-----+-----+-----+-----+
76−> | 123 | 123 | 123 | 123 |
76+| 123 | 123 | 123 | 123 |
77−> +-----+-----+-----+-----+
77++-----+-----+-----+-----+
78−> | 1 | 1 | 1 | 1 |
78+| 1 | 1 | 1 | 1 |
79−> +-----+-----+-----+-----+
79++-----+-----+-----+-----+
80
80
81Multiline table without column headers:
81Multiline table without column headers:
82
82
83−> +----------+---------+-----------+--------------------------+
83++----------+---------+-----------+--------------------------+
84−> | First | row | 12.0 | Example of a row that |
84+| First | row | 12.0 | Example of a row that |
85−> | | | | spans multiple lines. |
85+| | | | spans multiple lines. |
86−> +----------+---------+-----------+--------------------------+
86++----------+---------+-----------+--------------------------+
87−> | Second | row | 5.0 | Here’s another one. Note |
87+| Second | row | 5.0 | Here’s another one. Note |
88−> | | | | the blank line between |
88+| | | | the blank line between |
89−> | | | | rows. |
89+| | | | rows. |
90−> +----------+---------+-----------+--------------------------+
90++----------+---------+-----------+--------------------------+