Fix off-by-one error
The 'add one to account for starting at 1' only applies if we did the subtraction bit, which we don't on reverse listings. Fixing that means we're golden. Fixes #1.
This commit is contained in:
parent
604c8987b5
commit
302d352da4
2
app.py
2
app.py
|
@ -92,9 +92,9 @@ def abstract_listing_generator(listing_file,header_file=None,header_text=None,li
|
|||
log_name, log_link = line[1:].strip().split("\t")
|
||||
if count_from_end:
|
||||
log_num = total_line_count-line_count
|
||||
log_num += 1 # account for numbers starting at 1 and not 0
|
||||
else:
|
||||
log_num = line_count
|
||||
log_num += 1 # account for numbers starting at 1 and not 0
|
||||
log_link = urllib.parse.quote(log_link,safe='/')
|
||||
yield f"=> {log_link} {log_num} >> {log_name}\n"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user