changelog: highlight package name and nick with code formatting

parent e8bd667b
......@@ -6,6 +6,7 @@ from altrepo.api.errors import DataNotFoundError, RequestValidationError
from database.models import User
from data.keyboards import changelog_keyboards
from telegrinder.tools.formatting import HTMLFormatter, code_inline
from services.utils import _bold
PER_PAGE = 5
......@@ -14,11 +15,11 @@ dp = Dispatch()
def format_changelog_page(name: str, branch: str, changelog, offset: int, total: int):
message = _bold(f"Changelog: {name} ({branch})\n\n")
message = _bold("Changelog: ") + HTMLFormatter(code_inline(name)) + f" ({branch})\n\n"
for entry in changelog:
date = entry.date[:10]
message += f"{entry.evr} | {date} | {entry.nick}\n"
message += f"{entry.evr} | {date} | " + HTMLFormatter(code_inline(entry.nick)) + "\n"
message += f"{entry.message}\n\n"
message += f"Записи {offset + 1}–{offset + len(changelog)} из {total}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment