Skip to content

Commit

Permalink
Merge pull request #2 from vChavezB/static_column_fix
Browse files Browse the repository at this point in the history
Static column fix
  • Loading branch information
vChavezB authored Dec 11, 2022
2 parents 34d9b16 + 4038464 commit 94b1ca4
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions puncover_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,21 @@ def fix_sort_table(old_html):
if tfoot_start == -1:
return None

stack_col = new_html.find("Stack</a>") != -1
code_col = new_html.find("Code</a>") != -1
static_col = new_html.find("Static</a>") != -1

thead_simple = """<thead><tr>
<th width="100%">Name</th>
<th>Remarks</th>
<th class=\"js-sort-number\">Stack</th>
<th class=\"js-sort-number\">Code</th>
<th class=\"js-sort-number\">Static</th>
</tr>
</thead>
"""
"""
if stack_col:
thead_simple+='\n\t\t\t\t<th class=\"js-sort-number\">Stack</th>'
if code_col:
thead_simple+='\n\t\t\t\t<th class=\"js-sort-number\">Code</th>'
if static_col:
thead_simple+='\n\t\t\t\t<th class=\"js-sort-number\">Static</th>\n'
thead_simple+='\n\t\t</tr>\n'
new_html = new_html[:thead_start] + thead_simple + new_html[thead_end:]
title_start = new_html.find("<title>")
sort_script = '\n<script src="../static/js/sorttable.js"></script>\n'
Expand Down

0 comments on commit 94b1ca4

Please sign in to comment.