Menu

#159 issue a warning when an image file does not exist

None
closed-rejected
nobody
None
5
2023-11-13
2019-07-24
No

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.

1 Attachments

Discussion

  • Günter Milde

    Günter Milde - 2019-08-19

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

     
  • Günter Milde

    Günter Milde - 2019-08-19

    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.

     
  • Günter Milde

    Günter Milde - 2020-08-26
    • status: open --> pending-remind
    • Group: Default --> None
     
  • Günter Milde

    Günter Milde - 2023-11-13
    • status: pending-remind --> closed-rejected
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.