Skip to content

Commit

Permalink
Try rendering htm diffs as plain html
Browse files Browse the repository at this point in the history
  • Loading branch information
Myoldmopar committed Aug 4, 2022
1 parent 7aa4838 commit c721e53
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions epregressions/diffs/ci_compare_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,12 @@ def main_function(file_name, base_dir, mod_dir, base_sha, mod_sha, make_public,
key.make_public()

htmlkey = boto.s3.key.Key(bucket, file_path + ".html")
htmlkey.set_contents_from_string("""

if file_path_to_send.endswith('.htm'):
htmlkey.set_contents_from_string(contents)
else:
htmlkey.set_contents_from_string(
"""
<!doctype html>
<html>
<head>
Expand All @@ -280,7 +285,9 @@ def main_function(file_name, base_dir, mod_dir, base_sha, mod_sha, make_public,
<script>hljs.highlightAll();</script>
</body>
</html>
""", headers={"Content-Type": "text/html"})
""",
headers={"Content-Type": "text/html"}
)

if make_public:
htmlkey.make_public()
Expand Down

0 comments on commit c721e53

Please sign in to comment.