Skip to content

Commit

Permalink
Fix superscript 2 in HTML output (#95)
Browse files Browse the repository at this point in the history
Change `<sup></sup>` to `&sup2;`
  • Loading branch information
slightlynybbled authored Jul 20, 2020
1 parent a8b2dc3 commit a418005
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/wireviz/Harness.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,9 @@ def output(self, filename: (str, Path), view: bool = False, cleanup: bool = True
for row in listy[1:]:
file.write('<tr>')
for i, item in enumerate(row):
item_str = item.replace('\u00b2', '&sup2;')
align = 'align="right"' if listy[0][i] == 'Qty' else ''
file.write(f'<td {align} style="border:1px solid #000000; padding: 4px">{item}</td>')
file.write(f'<td {align} style="border:1px solid #000000; padding: 4px">{item_str}</td>')
file.write('</tr>')
file.write('</table>')

Expand Down

0 comments on commit a418005

Please sign in to comment.