diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2020-09-13 20:23:55 +0200 |
---|---|---|
committer | Albert Krewinkel <albert@zeitkraut.de> | 2020-09-13 20:26:06 +0200 |
commit | 871164051281b50a5b4b28cacee3dd15344d81f1 (patch) | |
tree | 8f840dc3d211ec5a854644d5d830c4c1c00d6d82 /test/tables | |
parent | cae155b095e5182cc1b342b21f7430e40afe7ba8 (diff) | |
download | pandoc-871164051281b50a5b4b28cacee3dd15344d81f1.tar.gz |
HTML writer: support attributes on all table elements
Add attributes to tbody and tr elements.
Diffstat (limited to 'test/tables')
-rw-r--r-- | test/tables/nordics.html4 | 22 | ||||
-rw-r--r-- | test/tables/nordics.html5 | 22 | ||||
-rw-r--r-- | test/tables/nordics.native | 22 |
3 files changed, 33 insertions, 33 deletions
diff --git a/test/tables/nordics.html4 b/test/tables/nordics.html4 index 13fa1976d..a0d15e1bd 100644 --- a/test/tables/nordics.html4 +++ b/test/tables/nordics.html4 @@ -1,4 +1,4 @@ -<table> +<table id="nordics" source="wikipedia"> <caption><p>States belonging to the <em>Nordics.</em></p></caption> <colgroup> <col width="30%" /> @@ -6,7 +6,7 @@ <col width="20%" /> <col width="20%" /> </colgroup> -<thead> +<thead class="simple-head"> <tr class="header"> <th align="center">Name</th> <th align="center">Capital</th> @@ -16,43 +16,43 @@ (in km<sup>2</sup>)</th> </tr> </thead> -<tbody> -<tr class="odd"> +<tbody class="souvereign-states"> +<tr class="odd" class="country"> <th align="center">Denmark</th> <td align="left">Copenhagen</td> <td align="left">5,809,502</td> <td align="left">43,094</td> </tr> -<tr class="even"> +<tr class="even" class="country"> <th align="center">Finland</th> <td align="left">Helsinki</td> <td align="left">5,537,364</td> <td align="left">338,145</td> </tr> -<tr class="odd"> +<tr class="odd" class="country"> <th align="center">Iceland</th> <td align="left">Reykjavik</td> <td align="left">343,518</td> <td align="left">103,000</td> </tr> -<tr class="even"> +<tr class="even" class="country"> <th align="center">Norway</th> <td align="left">Oslo</td> <td align="left">5,372,191</td> <td align="left">323,802</td> </tr> -<tr class="odd"> +<tr class="odd" class="country"> <th align="center">Sweden</th> <td align="left">Stockholm</td> <td align="left">10,313,447</td> <td align="left">450,295</td> </tr> </tbody><tfoot> -<tr class="even"> +<tr class="even" id="summary"> <td align="center">Total</td> <td align="left"></td> -<td align="left">27,376,022</td> -<td align="left">1,258,336</td> +<td align="left" id="total-population">27,376,022</td> +<td align="left" id="total-area">1,258,336</td> </tr> </tfoot> diff --git a/test/tables/nordics.html5 b/test/tables/nordics.html5 index f0dd8b958..f52cf8e4c 100644 --- a/test/tables/nordics.html5 +++ b/test/tables/nordics.html5 @@ -1,4 +1,4 @@ -<table> +<table id="nordics" data-source="wikipedia"> <caption><p>States belonging to the <em>Nordics.</em></p></caption> <colgroup> <col style="width: 30%" /> @@ -6,7 +6,7 @@ <col style="width: 20%" /> <col style="width: 20%" /> </colgroup> -<thead> +<thead class="simple-head"> <tr class="header"> <th style="text-align: center;">Name</th> <th style="text-align: center;">Capital</th> @@ -16,43 +16,43 @@ (in km<sup>2</sup>)</th> </tr> </thead> -<tbody> -<tr class="odd"> +<tbody class="souvereign-states"> +<tr class="odd" class="country"> <th style="text-align: center;">Denmark</th> <td style="text-align: left;">Copenhagen</td> <td style="text-align: left;">5,809,502</td> <td style="text-align: left;">43,094</td> </tr> -<tr class="even"> +<tr class="even" class="country"> <th style="text-align: center;">Finland</th> <td style="text-align: left;">Helsinki</td> <td style="text-align: left;">5,537,364</td> <td style="text-align: left;">338,145</td> </tr> -<tr class="odd"> +<tr class="odd" class="country"> <th style="text-align: center;">Iceland</th> <td style="text-align: left;">Reykjavik</td> <td style="text-align: left;">343,518</td> <td style="text-align: left;">103,000</td> </tr> -<tr class="even"> +<tr class="even" class="country"> <th style="text-align: center;">Norway</th> <td style="text-align: left;">Oslo</td> <td style="text-align: left;">5,372,191</td> <td style="text-align: left;">323,802</td> </tr> -<tr class="odd"> +<tr class="odd" class="country"> <th style="text-align: center;">Sweden</th> <td style="text-align: left;">Stockholm</td> <td style="text-align: left;">10,313,447</td> <td style="text-align: left;">450,295</td> </tr> </tbody><tfoot> -<tr class="even"> +<tr class="even" id="summary"> <td style="text-align: center;">Total</td> <td style="text-align: left;"></td> -<td style="text-align: left;">27,376,022</td> -<td style="text-align: left;">1,258,336</td> +<td style="text-align: left;" id="total-population">27,376,022</td> +<td style="text-align: left;" id="total-area">1,258,336</td> </tr> </tfoot> diff --git a/test/tables/nordics.native b/test/tables/nordics.native index dc6a33b39..01585c70d 100644 --- a/test/tables/nordics.native +++ b/test/tables/nordics.native @@ -1,46 +1,46 @@ -[Table ("",[],[]) (Caption (Just [Str "Nordic countries"]) +[Table ("nordics",[],[("source","wikipedia")]) (Caption (Just [Str "Nordic countries"]) [Para [Str "States", Space, Str "belonging", Space, Str "to", Space, Str "the", Space, Emph [Str "Nordics."]]]) [(AlignCenter,ColWidth 0.3) ,(AlignLeft,ColWidth 0.3) ,(AlignLeft,ColWidth 0.2) ,(AlignLeft,ColWidth 0.2)] - (TableHead ("",[],[]) + (TableHead ("",["simple-head"],[]) [Row ("",[],[]) [Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1) [Plain [Str "Name"]] ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1) [Plain [Str "Capital"]] ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1) [Plain [Str "Population", LineBreak, Str "(in", Space, Str "2018)"]] ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1) [Plain [Str "Area", LineBreak, Str "(in", Space, Str "km", Superscript [Str "2"], Str ")"]]]]) - [(TableBody ("",[],[]) (RowHeadColumns 1) + [(TableBody ("",["souvereign-states"],[]) (RowHeadColumns 1) [] - [Row ("",[],[]) + [Row ("",["country"],[]) [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "Denmark"]] ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "Copenhagen"]] ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "5,809,502"]] ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "43,094"]]] - ,Row ("",[],[]) + ,Row ("",["country"],[]) [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "Finland"]] ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "Helsinki"]] ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "5,537,364"]] ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "338,145"]]] - ,Row ("",[],[]) + ,Row ("",["country"],[]) [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "Iceland"]] ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "Reykjavik"]] ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "343,518"]] ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "103,000"]]] - ,Row ("",[],[]) + ,Row ("",["country"],[]) [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "Norway"]] ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "Oslo"]] ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "5,372,191"]] ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "323,802"]]] - ,Row ("",[],[]) + ,Row ("",["country"],[]) [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "Sweden"]] ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "Stockholm"]] ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "10,313,447"]] ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "450,295"]]]])] (TableFoot ("",[],[]) - [Row ("",[],[]) + [Row ("summary",[],[]) [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "Total"]] ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [] - ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "27,376,022"]] - ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "1,258,336"]]]]) + ,Cell ("total-population",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "27,376,022"]] + ,Cell ("total-area",[],[]) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "1,258,336"]]]]) ] |