Skip to content

Commit ecb26e2

Browse files
authored
replace deprecated HTML
1 parent 69dc8ed commit ecb26e2

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

tabulate/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ def _pipe_line_with_colons(colwidths, colaligns):
136136
def _mediawiki_row_with_attrs(separator, cell_values, colwidths, colaligns):
137137
alignment = {
138138
"left": "",
139-
"right": 'align="right"| ',
140-
"center": 'align="center"| ',
141-
"decimal": 'align="right"| ',
139+
"right": 'style="text-align: right;"| ',
140+
"center": 'style="text-align: center;"| ',
141+
"decimal": 'style="text-align: right;"| ',
142142
}
143143
# hard-coded padding _around_ align attribute and value together
144144
# rather than padding parameter which affects only the value
@@ -1952,11 +1952,11 @@ def tabulate(
19521952
{| class="wikitable" style="text-align: left;"
19531953
|+ <!-- caption -->
19541954
|-
1955-
! strings !! align="right"| numbers
1955+
! strings !! style="text-align: right;"| numbers
19561956
|-
1957-
| spam || align="right"| 41.9999
1957+
| spam || style="text-align: right;"| 41.9999
19581958
|-
1959-
| eggs || align="right"| 451
1959+
| eggs || style="text-align: right;"| 451
19601960
|}
19611961
19621962
"html" produces HTML markup as an html.escape'd str

0 commit comments

Comments
 (0)