From ddbda989412bde988a5a9b930899095e8ebec0f9 Mon Sep 17 00:00:00 2001 From: KV Date: Thu, 15 Oct 2020 20:56:05 +0200 Subject: [PATCH] Avoid errors from HTML validator The https://validator.w3.org/ reported Errors: The align attribute on the th/td element is obsolete. Use CSS instead. By replacing align="X" attributes with text-align:X; CSS equivalent, the validator now completes without any errors or warnings. This solves the remaining issues from #97. --- src/wireviz/Harness.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wireviz/Harness.py b/src/wireviz/Harness.py index 32eedaf0..11b7f698 100644 --- a/src/wireviz/Harness.py +++ b/src/wireviz/Harness.py @@ -316,14 +316,14 @@ def output(self, filename: (str, Path), view: bool = False, cleanup: bool = True file.write('') file.write('') for item in listy[0]: - file.write(f'') + file.write(f'') file.write('') for row in listy[1:]: file.write('') for i, item in enumerate(row): item_str = item.replace('\u00b2', '²') - align = 'align="right"' if listy[0][i] == 'Qty' else '' - file.write(f'') + align = 'text-align:right; ' if listy[0][i] == 'Qty' else '' + file.write(f'') file.write('') file.write('
{item}{item}
{item_str}{item_str}
')