You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppose you have the following test file with at least two trailing newlines:
# Blame
Test
Import that into the repository by commiting it on the CLI or pulling it from somewhere.
You can view the resulting page, but when trying to show its blame, you get:
File "/opt/venv/lib/python3.12/site-packages/otterwiki/wiki.py", line 742, in blame
line = markup_lines[int(row[3]) - 1]
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
IndexError: list index out of range
Wrapping line 742 into try/except like this seems to fix it:
Admittedly, it's a corner case. It does not happen when saving the page from within the wiki where trailing newlines are truncated to a single newline.
The text was updated successfully, but these errors were encountered:
Suppose you have the following test file with at least two trailing newlines:
# Blame Test
Import that into the repository by commiting it on the CLI or pulling it from somewhere.
You can view the resulting page, but when trying to show its blame, you get:
Wrapping line 742 into try/except like this seems to fix it:
Admittedly, it's a corner case. It does not happen when saving the page from within the wiki where trailing newlines are truncated to a single newline.
The text was updated successfully, but these errors were encountered: