0bdcf415e4
Update tests. Reason: it turns out that the native output generated by pretty-simple isn't always readable by the native reader. According to https://github.com/cdepillabout/pretty-simple/issues/99 it is not a design goal of the library that the rendered values be readable using 'read'. This makes it unsuitable for our purposes. pretty-show is a bit slower and it uses 4-space indents (non-configurable), but it doesn't have this serious drawback.
167 lines
3.8 KiB
Markdown
167 lines
3.8 KiB
Markdown
```
|
|
% pandoc -f html -t native
|
|
<table>
|
|
<caption>Demonstration of simple table syntax.</caption>
|
|
<thead>
|
|
<tr class="header">
|
|
<th align="right">Right</th>
|
|
<th align="left">Left</th>
|
|
<th align="center">Center</th>
|
|
<th>Default</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="odd">
|
|
<td align="right">12</td>
|
|
<td align="left">12</td>
|
|
<td align="center">12</td>
|
|
<td>12</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
^D
|
|
[ Table
|
|
( "" , [] , [] )
|
|
(Caption
|
|
Nothing
|
|
[ Plain
|
|
[ Str "Demonstration"
|
|
, Space
|
|
, Str "of"
|
|
, Space
|
|
, Str "simple"
|
|
, Space
|
|
, Str "table"
|
|
, Space
|
|
, Str "syntax."
|
|
]
|
|
])
|
|
[ ( AlignRight , ColWidthDefault )
|
|
, ( AlignLeft , ColWidthDefault )
|
|
, ( AlignCenter , ColWidthDefault )
|
|
, ( AlignDefault , ColWidthDefault )
|
|
]
|
|
(TableHead
|
|
( "" , [] , [] )
|
|
[ Row
|
|
( "" , [ "header" ] , [] )
|
|
[ Cell
|
|
( "" , [] , [] )
|
|
AlignRight
|
|
(RowSpan 1)
|
|
(ColSpan 1)
|
|
[ Plain [ Str "Right" ] ]
|
|
, Cell
|
|
( "" , [] , [] )
|
|
AlignLeft
|
|
(RowSpan 1)
|
|
(ColSpan 1)
|
|
[ Plain [ Str "Left" ] ]
|
|
, Cell
|
|
( "" , [] , [] )
|
|
AlignCenter
|
|
(RowSpan 1)
|
|
(ColSpan 1)
|
|
[ Plain [ Str "Center" ] ]
|
|
, Cell
|
|
( "" , [] , [] )
|
|
AlignDefault
|
|
(RowSpan 1)
|
|
(ColSpan 1)
|
|
[ Plain [ Str "Default" ] ]
|
|
]
|
|
])
|
|
[ TableBody
|
|
( "" , [] , [] )
|
|
(RowHeadColumns 0)
|
|
[]
|
|
[ Row
|
|
( "" , [ "odd" ] , [] )
|
|
[ Cell
|
|
( "" , [] , [] )
|
|
AlignRight
|
|
(RowSpan 1)
|
|
(ColSpan 1)
|
|
[ Plain [ Str "12" ] ]
|
|
, Cell
|
|
( "" , [] , [] )
|
|
AlignLeft
|
|
(RowSpan 1)
|
|
(ColSpan 1)
|
|
[ Plain [ Str "12" ] ]
|
|
, Cell
|
|
( "" , [] , [] )
|
|
AlignCenter
|
|
(RowSpan 1)
|
|
(ColSpan 1)
|
|
[ Plain [ Str "12" ] ]
|
|
, Cell
|
|
( "" , [] , [] )
|
|
AlignDefault
|
|
(RowSpan 1)
|
|
(ColSpan 1)
|
|
[ Plain [ Str "12" ] ]
|
|
]
|
|
]
|
|
]
|
|
(TableFoot ( "" , [] , [] ) [])
|
|
]
|
|
```
|
|
|
|
```
|
|
% pandoc -f html -t native
|
|
<table>
|
|
<tr class="odd">
|
|
<td style="text-align: right;">12</td>
|
|
<td style="text-align:left;">12</td>
|
|
<td style="text-align: center">12</td>
|
|
<td style="text-align: right;">12</td>
|
|
</tr>
|
|
</table>
|
|
^D
|
|
[ Table
|
|
( "" , [] , [] )
|
|
(Caption Nothing [])
|
|
[ ( AlignRight , ColWidthDefault )
|
|
, ( AlignLeft , ColWidthDefault )
|
|
, ( AlignCenter , ColWidthDefault )
|
|
, ( AlignRight , ColWidthDefault )
|
|
]
|
|
(TableHead ( "" , [] , [] ) [])
|
|
[ TableBody
|
|
( "" , [] , [] )
|
|
(RowHeadColumns 0)
|
|
[]
|
|
[ Row
|
|
( "" , [ "odd" ] , [] )
|
|
[ Cell
|
|
( "" , [] , [] )
|
|
AlignRight
|
|
(RowSpan 1)
|
|
(ColSpan 1)
|
|
[ Plain [ Str "12" ] ]
|
|
, Cell
|
|
( "" , [] , [] )
|
|
AlignLeft
|
|
(RowSpan 1)
|
|
(ColSpan 1)
|
|
[ Plain [ Str "12" ] ]
|
|
, Cell
|
|
( "" , [] , [] )
|
|
AlignCenter
|
|
(RowSpan 1)
|
|
(ColSpan 1)
|
|
[ Plain [ Str "12" ] ]
|
|
, Cell
|
|
( "" , [] , [] )
|
|
AlignRight
|
|
(RowSpan 1)
|
|
(ColSpan 1)
|
|
[ Plain [ Str "12" ] ]
|
|
]
|
|
]
|
|
]
|
|
(TableFoot ( "" , [] , [] ) [])
|
|
]
|
|
```
|
|
|