You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My users may introduce a mistake when writing markdown, tagging an important link as an image. As a result, the tool will try to download the html and then delete the link. Losing the link from the article is a problem.
For example in a md file containing
Important link to remember: ![](https://www.google.com/)
the link would be deleted when processing the article, resulting in the following
Important link to remember: ![](.html)
A solution to this particular case would be to raise an exception when replacing the image link if the file name is empty. In www_tools.py after line 73 in function get_filename_from_url, add
if f_name == "": raise ValueError(f'F_name is empty {req.url}')
However, the problem would persist for certain links.
Important link: ![](https://github.com/artiomn/markdown_articles_tool)
would still be replaced by Important link: ![](markdown_articles_tool.html)
In this case it would be necessary to check the MIME type of the downloaded content before replacing the link.
The text was updated successfully, but these errors were encountered:
Hello
My users may introduce a mistake when writing markdown, tagging an important link as an image. As a result, the tool will try to download the html and then delete the link. Losing the link from the article is a problem.
For example in a md file containing
Important link to remember: ![](https://www.google.com/)
the link would be deleted when processing the article, resulting in the following
Important link to remember: ![](.html)
A solution to this particular case would be to raise an exception when replacing the image link if the file name is empty. In
www_tools.py
after line 73 in functionget_filename_from_url
, addif f_name == "": raise ValueError(f'F_name is empty {req.url}')
However, the problem would persist for certain links.
Important link: ![](https://github.com/artiomn/markdown_articles_tool)
would still be replaced by
Important link: ![](markdown_articles_tool.html)
In this case it would be necessary to check the MIME type of the downloaded content before replacing the link.
The text was updated successfully, but these errors were encountered: