File tree 3 files changed +6
-5
lines changed
3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -466,7 +466,7 @@ def _translate(self):
466
466
}
467
467
colspan = col_lengths .get ((r , c ), 0 )
468
468
if colspan > 1 :
469
- es ["attributes" ] = [ f'colspan="{ colspan } "' ]
469
+ es ["attributes" ] = f'colspan="{ colspan } "'
470
470
row_es .append (es )
471
471
head .append (row_es )
472
472
@@ -517,7 +517,7 @@ def _translate(self):
517
517
}
518
518
rowspan = idx_lengths .get ((c , r ), 0 )
519
519
if rowspan > 1 :
520
- es ["attributes" ] = [ f'rowspan="{ rowspan } "' ]
520
+ es ["attributes" ] = f'rowspan="{ rowspan } "'
521
521
row_es .append (es )
522
522
523
523
for c , col in enumerate (self .data .columns ):
@@ -529,6 +529,7 @@ def _translate(self):
529
529
"value" : value ,
530
530
"display_value" : formatter (value ),
531
531
"is_visible" : (c not in hidden_columns ),
532
+ "attributes" : "" ,
532
533
}
533
534
534
535
# only add an id if the cell has a style
Original file line number Diff line number Diff line change 39
39
<tr >
40
40
{% for c in r %}
41
41
{% if c.is_visible != False %}
42
- <{ {c.type} } class="{ {c.class} }" { {c.attributes|join( " " ) } }>{ {c.value} }</{ {c.type} }>
42
+ <{ {c.type} } class="{ {c.class} }" { {c.attributes} }>{ {c.value} }</{ {c.type} }>
43
43
{% endif %}
44
44
{% endfor %}
45
45
</tr >
56
56
<tr >
57
57
{% for c in r %}
58
58
{% if c.is_visible != False %}
59
- <{ {c.type} } {% if c.id is defined -%} id="T_{ {uuid} }{ {c.id} }" {% - endif %} class="{ {c.class} }" { {c.attributes|join( " " ) } }>{ {c.display_value} }</{ {c.type} }>
59
+ <{ {c.type} } {% if c.id is defined -%} id="T_{ {uuid} }{ {c.id} }" {% - endif %} class="{ {c.class} }" { {c.attributes} }>{ {c.display_value} }</{ {c.type} }>
60
60
{% endif %}
61
61
{% endfor %}
62
62
</tr >
Original file line number Diff line number Diff line change @@ -1323,7 +1323,7 @@ def test_mi_sparse(self):
1323
1323
"display_value" : "a" ,
1324
1324
"is_visible" : True ,
1325
1325
"type" : "th" ,
1326
- "attributes" : [ 'rowspan="2"' ] ,
1326
+ "attributes" : 'rowspan="2"' ,
1327
1327
"class" : "row_heading level0 row0" ,
1328
1328
"id" : "level0_row0" ,
1329
1329
}
You can’t perform that action at this time.
0 commit comments