Skip to content

Commit

Permalink
Add <time datetime> to latest update in colophon
Browse files Browse the repository at this point in the history
  • Loading branch information
robinwhittleton committed Oct 23, 2024
1 parent b2e7806 commit dc49ebf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion se/se_epub_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def build(self, run_epubcheck: bool, check_only: bool, build_kobo: bool, build_k
with open(file_path, "r+", encoding="utf-8") as file:
xhtml = file.read()

xhtml = xhtml.replace("<p>The first edition of this ebook was released on<br/>", f"<p>This edition was released on<br/>\n\t\t\t<b>{last_updated_friendly}</b><br/>\n\t\t\tand is based on<br/>\n\t\t\t<b>revision {self.last_commit.short_sha}</b>.<br/>\n\t\t\tThe first edition of this ebook was released on<br/>")
xhtml = xhtml.replace("<p>The first edition of this ebook was released on<br/>", f"<p>This edition was released on<br/>\n\t\t\t<b><time datetime=\"{last_updated_iso}\">{last_updated_friendly}</time></b><br/>\n\t\t\tand is based on<br/>\n\t\t\t<b>revision {self.last_commit.short_sha}</b>.<br/>\n\t\t\tThe first edition of this ebook was released on<br/>")

file.seek(0)
file.write(xhtml)
Expand Down

0 comments on commit dc49ebf

Please sign in to comment.