🎨 Fixed markdown syntax

This commit is contained in:
Nikhil Badyal
2024-04-13 13:27:55 +05:30
parent d91855a31f
commit 4897857856
+5 -3
View File
@@ -80,8 +80,10 @@ def format_changelog(name: str, response: dict[str, str]) -> dict[str, str]:
def write_changelog_to_file() -> None: def write_changelog_to_file() -> None:
"""The function `write_changelog_to_file` writes a given changelog json to a file.""" """The function `write_changelog_to_file` writes a given changelog json to a file."""
markdown_table = """| Resource Name | Version | Changelog | Published On | Build By\n markdown_table = """
"|---------|---------|-----------|--------------|--------------|\n""" | Resource Name | Version | Changelog | Published On | Build By|\n
|---------------|---------|-----------|--------------|---------|\n
"""
for app_data in changelogs.values(): for app_data in changelogs.values():
name_link = app_data["ResourceName"] name_link = app_data["ResourceName"]
version = app_data["Version"] version = app_data["Version"]
@@ -94,7 +96,7 @@ def write_changelog_to_file() -> None:
changelog = changelog.replace("\n", "<br>") changelog = changelog.replace("\n", "<br>")
# Add row to the Markdown table string # Add row to the Markdown table string
markdown_table += f"| {name_link} | {version} | {changelog} | {published_at} | {built_by}\n" markdown_table += f"| {name_link} | {version} | {changelog} | {published_at} | {built_by} |\n"
with Path(changelog_file).open("w", encoding="utf_8") as file1: with Path(changelog_file).open("w", encoding="utf_8") as file1:
file1.write(markdown_table) file1.write(markdown_table)