diff --git a/__init__.py b/__init__.py index d31c8ce..e568118 100644 --- a/__init__.py +++ b/__init__.py @@ -17,8 +17,13 @@ def convert_case(string: str): return string def article_to_xml(article_path: pathlib.Path): - with (article_path / "article.md").open("r") as f: - markdown_data = f.read() + try: + with (article_path / "article.md").open("r") as f: + markdown_data = f.read() + + except Exception as e: + print(e) + return markdown_instance = markdown.Markdown(extensions=['meta', 'nl2br']) html = markdown_instance.convert(markdown_data)