Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compatibility with python3.13 #25

Merged
merged 2 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions doorstop/core/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,8 +880,7 @@ def get_issues(
@staticmethod
def _get_issues_level(items):
"""Yield all the document's issues related to item level."""
prev = items[0] if items else None
for item in items[1:]:
for prev, item in zip(items, items[1:]):
puid = prev.uid
plev = prev.level
nuid = item.uid
Expand Down Expand Up @@ -913,7 +912,6 @@ def _get_issues_level(items):
)
yield DoorstopInfo(msg)
break
prev = item

@delete_document
def delete(self, path=None):
Expand Down
3 changes: 2 additions & 1 deletion doorstop/core/publishers/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ def lines_index(self, filenames, tree=None):
text = tree.draw(html_links=True) if tree else None
yield ""
yield "<h3>Tree Structure:</h3>"
yield "<pre><code>" + text + "</pre></code>"
if text is not None:
yield "<pre><code>" + text + "</pre></code>"
yield ""
yield "<hr>"
# Additional files
Expand Down
Loading
Loading