-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RST writer: fix two issues with list tables.
- Fix alignment of list items corresponding to cells. - Don't enclose the list table in a `.. table::`; this leads to doubled captions. Closes #10226. Closes #10227. Modified test output for #4564.
- Loading branch information
Showing
2 changed files
with
58 additions
and
65 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,58 @@ | ||
``` | ||
% pandoc -f native -t rst --list-tables | ||
[BlockQuote | ||
[Table ("",[],[]) (Caption Nothing | ||
[]) | ||
[(AlignDefault,ColWidth 0.1527777777777778) | ||
,(AlignDefault,ColWidth 0.1388888888888889) | ||
,(AlignDefault,ColWidth 0.16666666666666666) | ||
,(AlignDefault,ColWidth 0.375)] | ||
(TableHead ("",[],[]) | ||
[Table ("",[],[]) (Caption Nothing | ||
[Plain [Str "Here",Space,Str "is",Space,Str "a",Space,Str "caption."]]) | ||
[(AlignDefault,ColWidth 0.1527777777777778) | ||
,(AlignDefault,ColWidth 0.1388888888888889) | ||
,(AlignDefault,ColWidth 0.16666666666666666) | ||
,(AlignDefault,ColWidth 0.375)] | ||
(TableHead ("",[],[]) | ||
[Row ("",[],[]) | ||
[Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) | ||
[Plain [Str "Centered",SoftBreak,Str "Header"]] | ||
,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) | ||
[Plain [Str "Left",SoftBreak,Str "Aligned"]] | ||
,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) | ||
[Plain [Str "Right",SoftBreak,Str "Aligned"]] | ||
,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) | ||
[Plain [Str "Default",Space,Str "aligned"]]]]) | ||
[(TableBody ("",[],[]) (RowHeadColumns 0) | ||
[] | ||
[Row ("",[],[]) | ||
[Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) | ||
[Plain [Str "Centered",SoftBreak,Str "Header"]] | ||
[Plain [Str "First"]] | ||
,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) | ||
[Plain [Str "Left",SoftBreak,Str "Aligned"]] | ||
[Plain []] | ||
,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) | ||
[Plain [Str "Right",SoftBreak,Str "Aligned"]] | ||
[Plain [Str "12.0"]] | ||
,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) | ||
[Plain [Str "Default",Space,Str "aligned"]]]]) | ||
[(TableBody ("",[],[]) (RowHeadColumns 0) | ||
[] | ||
[Row ("",[],[]) | ||
[Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) | ||
[Plain [Str "First"]] | ||
,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) | ||
[Plain [Str "row"]] | ||
,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) | ||
[Plain [Str "12.0"]] | ||
,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) | ||
[Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",SoftBreak,Str "spans",Space,Str "multiple",Space,Str "lines."]]] | ||
,Row ("",[],[]) | ||
[Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) | ||
[Plain [Str "Second"]] | ||
,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) | ||
[Plain [Str "row"]] | ||
,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) | ||
[Plain [Str "5.0"]] | ||
,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) | ||
[Plain [Str "Here\8217s",Space,Str "another",Space,Str "one.",Space,Str "Note",SoftBreak,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",SoftBreak,Str "rows."]]]])] | ||
(TableFoot ("",[],[]) | ||
[])]] | ||
[Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",SoftBreak,Str "spans",Space,Str "multiple",Space,Str "lines."]]] | ||
,Row ("",[],[]) | ||
[Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) | ||
[Plain [Str "Second"]] | ||
,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) | ||
[Plain [Str "row"]] | ||
,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) | ||
[Plain [Str "5.0"]] | ||
,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) | ||
[Plain [Str "Here\8217s",Space,Str "another",Space,Str "one.",Space,Str "Note",SoftBreak,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",SoftBreak,Str "rows."]]]])] | ||
(TableFoot ("",[],[]) | ||
[])] | ||
^D | ||
.. list-table:: | ||
:widths: 11 10 12 27 | ||
:header-rows: 1 | ||
- | ||
- Centered Header | ||
- Left Aligned | ||
- Right Aligned | ||
- Default aligned | ||
- | ||
- First | ||
- row | ||
- 12.0 | ||
- Example of a row that spans multiple lines. | ||
- | ||
.. list-table:: Here is a caption. | ||
:widths: 11 10 12 27 | ||
:header-rows: 1 | ||
- Second | ||
- row | ||
- 5.0 | ||
- Here’s another one. Note the blank line between rows. | ||
* - Centered Header | ||
- Left Aligned | ||
- Right Aligned | ||
- Default aligned | ||
* - First | ||
- | ||
- 12.0 | ||
- Example of a row that spans multiple lines. | ||
* - Second | ||
- row | ||
- 5.0 | ||
- Here’s another one. Note the blank line between rows. | ||
``` |