add PASTETOGRAMMARLY to html filename

This commit is contained in:
Sina Atalay 2024-02-14 20:22:42 +01:00
parent 7a183bdaf0
commit 34c4fc6ac6
1 changed files with 3 additions and 1 deletions

View File

@ -965,7 +965,9 @@ def markdown_to_html(markdown_file_path: pathlib.Path) -> pathlib.Path:
if not markdown_file_path.is_file():
raise FileNotFoundError(f"The file {markdown_file_path} doesn't exist!")
html_file_path = markdown_file_path.with_suffix(".html")
html_file_path = (
markdown_file_path.parent / f"{markdown_file_path.name}_PASTETOGRAMMARLY.html"
)
# Convert the markdown file to HTML:
html = markdown.markdown(markdown_file_path.read_text(encoding="utf-8"))