wmlunits: Specify error as class in html reports (#7581)

This commit is contained in:
Slayer95 2023-05-05 14:05:09 -05:00 committed by GitHub
parent 4494689d68
commit 5eaed1b744
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,7 +145,7 @@ def main(folder):
for line in text.splitlines():
line = line.strip()
if line in ["<INTERNAL ERROR>", "<WML ERROR>", "<PARSE ERROR>", "<TIMEOUT ERROR>"]:
htmlerr.write('<p>')
htmlerr.write('<p class="error %s">' % line[1:-1].replace(" ", "-").lower())
elif line in ["</INTERNAL ERROR>", "</WML ERROR>", "</PARSE ERROR>", "</TIMEOUT ERROR>"]:
htmlerr.write('</p>')
else: