forked from haskell/haddock
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add table examples * Add table types and adopt simple parser Simple parser is done by Giovanni Cappellotto (@potomak) in haskell#577 It seems to support single fine full tables, so far from full RST-grid tables, but it's good start. Table type support row- and colspans, but obviously parser is lacking. Still TODO: - Latex backend. Should we use multirow package https://ctan.org/pkg/multirow?lang=en? - Hoogle backend: ? * Implement grid-tables * Refactor table parser * Add two ill-examples * Update CHANGES.md * Basic documentation for tables * Fix documentation example
- Loading branch information
Showing
29 changed files
with
996 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
+------+--------------+------------------------------------------+ | ||
| code | message | description | | ||
+======+==============+==========================================+ | ||
| 200 | @OK@ | operation successful | | ||
+------+--------------+------------------------------------------+ | ||
| 204 | @No Content@ | operation successful, no body returned | | ||
+------+--------------+------------------------------------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
DocTable | ||
Table | ||
{tableBodyRows = [TableRow | ||
[TableCell | ||
{tableCellColspan = 1, | ||
tableCellContents = DocString " 200 ", | ||
tableCellRowspan = 1}, | ||
TableCell | ||
{tableCellColspan = 1, | ||
tableCellContents = DocAppend | ||
(DocString " ") | ||
(DocAppend | ||
(DocMonospaced (DocString "OK")) | ||
(DocString " ")), | ||
tableCellRowspan = 1}, | ||
TableCell | ||
{tableCellColspan = 1, | ||
tableCellContents = DocString | ||
" operation successful ", | ||
tableCellRowspan = 1}], | ||
TableRow | ||
[TableCell | ||
{tableCellColspan = 1, | ||
tableCellContents = DocString " 204 ", | ||
tableCellRowspan = 1}, | ||
TableCell | ||
{tableCellColspan = 1, | ||
tableCellContents = DocAppend | ||
(DocString " ") | ||
(DocAppend | ||
(DocMonospaced (DocString "No Content")) | ||
(DocString " ")), | ||
tableCellRowspan = 1}, | ||
TableCell | ||
{tableCellColspan = 1, | ||
tableCellContents = DocString | ||
" operation successful, no body returned ", | ||
tableCellRowspan = 1}]], | ||
tableHeaderRows = [TableRow | ||
[TableCell | ||
{tableCellColspan = 1, | ||
tableCellContents = DocString " code ", | ||
tableCellRowspan = 1}, | ||
TableCell | ||
{tableCellColspan = 1, | ||
tableCellContents = DocString " message ", | ||
tableCellRowspan = 1}, | ||
TableCell | ||
{tableCellColspan = 1, | ||
tableCellContents = DocString | ||
" description ", | ||
tableCellRowspan = 1}]]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
+------------------------+------------+----------+----------+ | ||
| Header row, column 1 | Header 2 | Header 3 | Header 4 | | ||
| (header rows optional) | | | | | ||
+========================+============+==========+==========+ | ||
| body row 1, column 1 | column 2 | column 3 | column 4 | | ||
+------------------------+------------+----------+----------+ | ||
| body row 2 | Cells may span columns. | | ||
+------------------------+------------+---------------------+ | ||
| body row 3 | Cells may | \[ | | ||
+------------------------+ span rows. | f(n) = \sum_{i=1} | | ||
| body row 4 | | \] | | ||
+------------------------+------------+---------------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
DocTable | ||
Table | ||
{tableBodyRows = [TableRow | ||
[TableCell | ||
{tableCellColspan = 1, | ||
tableCellContents = DocString " body row 1, column 1 ", | ||
tableCellRowspan = 1}, | ||
TableCell | ||
{tableCellColspan = 1, | ||
tableCellContents = DocString " column 2 ", | ||
tableCellRowspan = 1}, | ||
TableCell | ||
{tableCellColspan = 1, | ||
tableCellContents = DocString " column 3 ", | ||
tableCellRowspan = 1}, | ||
TableCell | ||
{tableCellColspan = 1, | ||
tableCellContents = DocString " column 4 ", | ||
tableCellRowspan = 1}], | ||
TableRow | ||
[TableCell | ||
{tableCellColspan = 1, | ||
tableCellContents = DocString " body row 2 ", | ||
tableCellRowspan = 1}, | ||
TableCell | ||
{tableCellColspan = 3, | ||
tableCellContents = DocString " Cells may span columns. ", | ||
tableCellRowspan = 1}], | ||
TableRow | ||
[TableCell | ||
{tableCellColspan = 1, | ||
tableCellContents = DocString " body row 3 ", | ||
tableCellRowspan = 1}, | ||
TableCell | ||
{tableCellColspan = 1, | ||
tableCellContents = DocString | ||
(concat | ||
[" Cells may \n", | ||
" span rows. \n", | ||
" "]), | ||
tableCellRowspan = 2}, | ||
TableCell | ||
{tableCellColspan = 2, | ||
tableCellContents = DocAppend | ||
(DocString " ") | ||
(DocAppend | ||
(DocMathDisplay | ||
(concat | ||
[" \n", | ||
" f(n) = \\sum_{i=1} \n", | ||
" "])) | ||
(DocString " ")), | ||
tableCellRowspan = 2}], | ||
TableRow | ||
[TableCell | ||
{tableCellColspan = 1, | ||
tableCellContents = DocString " body row 4 ", | ||
tableCellRowspan = 1}]], | ||
tableHeaderRows = [TableRow | ||
[TableCell | ||
{tableCellColspan = 1, | ||
tableCellContents = DocString | ||
(concat | ||
[" Header row, column 1 \n", | ||
" (header rows optional) "]), | ||
tableCellRowspan = 1}, | ||
TableCell | ||
{tableCellColspan = 1, | ||
tableCellContents = DocString | ||
(concat [" Header 2 \n", " "]), | ||
tableCellRowspan = 1}, | ||
TableCell | ||
{tableCellColspan = 1, | ||
tableCellContents = DocString | ||
(concat [" Header 3 \n", " "]), | ||
tableCellRowspan = 1}, | ||
TableCell | ||
{tableCellColspan = 1, | ||
tableCellContents = DocString | ||
(concat [" Header 4 \n", " "]), | ||
tableCellRowspan = 1}]]} |
Oops, something went wrong.