Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue a warning when an image file does not exist [SF:patches:159] #641

Open
chrisjsewell opened this issue Aug 9, 2020 · 0 comments
Open

Comments

@chrisjsewell
Copy link
Owner

author: bariumbitmap
created: 2019-07-24 20:45:25.381000
assigned: None
SF_url: https://sourceforge.net/p/docutils/patches/159

attachments:

rst2html does not issue a warning when an image file does not exist. For example, this will not produce a warning if the file "this-does-no-exist.png" does not exist:

.. image:: this-does-not-exist.png

I have attached a patch that issues a warning when file insertion is enabled and the image URI is a file URL or a path.


commenter: milde
posted: 2019-08-19 08:50:14.201000
title: #159 issue a warning when an image file does not exist

Ticket moved from /p/docutils/bugs/368/


commenter: milde
posted: 2019-08-19 08:59:57.956000
title: #159 issue a warning when an image file does not exist

Thank you for the report and patch.
There are, however two issues:
a) The warning might interfere with the workflow for some users as the referenced file may exist in the target directory or as relative URL of the target document.
b) the "file-insertion-enabled" setting is a safety setting for cases where external files become actually part of the generated document and should not be mixed with other uses. http://docutils.sourceforge.net/docs/user/config.html#file-insertion-enabled

As the use cases differ widely, I recommend checking the links in generated documents manually or in a document generation wrapper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant