Use f-strings in `linecounter`
This is a bit simpler and has a marginal performance gain.
This commit is contained in:
parent
2a40a3f233
commit
e3198ebd3b
|
@ -103,7 +103,7 @@ def _highlight_file(repo, ref, entry, data, blob_id, commit_id):
|
|||
def linecounter(count):
|
||||
out = []
|
||||
for i in range(1, count + 1):
|
||||
out.append('<a href="#L{}" id="L{}">{}\n</a>'.format(i, i, i))
|
||||
out.append(f'<a href="#L{i}" id="L{i}">{i}\n</a>')
|
||||
return "".join(out)
|
||||
|
||||
def render_empty_repo(owner, repo, view):
|
||||
|
|
Loading…
Reference in New Issue