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

Images not copied when using ![caption](filename) image syntax in markdown files (Origin: bugzilla #672656) #4635

Closed
doxygen opened this Issue Jul 2, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@doxygen
Owner

doxygen commented Jul 2, 2018

status RESOLVED severity normal in component general for ---
Reported in version 1.8.0 on platform Other
Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2012-03-22 21:50:02 +0000, Chris wrote:

Created attachment 210385
Bug demonstration files

Issue encountered when using doxygen 1.8.0 on gentoo linux.

When doxygen is processing markdown files, any images included in the page using the syntax

caption

are not copied into the output documentation (it generates an tag in the html as expected, but the image file is not copied into the output, and hence does not show when the page is viewed in the browser). However, using normal doxygen image syntax instead

@image html filename.ong "caption"

works as expected - the image is copied. I have attached a tarball containing two directories "working" and "broken". The contents of the two directories are identical, except for the contents of

working/mdfiles/structure.md - uses doxygen syntax for the image
broken/mdfiles/structure.md - uses markdown syntax

Steps to reproduce the problem are as follows. At a terminal prompt, issue:

$ tar xjf bugrep.tar.bz2
$ cd bugrep/working
$ doxygen
$ cd ../broken
$ doxygen

Now view the documentation generated:

bugrep/broken/docs/webperl/appstructure.html - img tag present, but no image file
bugrep/working/docs/webperl/appstructure.html - image present and working

I note that, when processing the 'broken' tree, the following output may be significant:

$ doxygen -d markdown
Searching for include files...
Searching for example files...
Searching for images...
Searching for files in directory /home/chris/bugrep/broken/mdfiles
Searching for dot files...
Searching for msc files...
Searching for files to exclude
Searching for files to process...
Searching for files in directory /home/chris/bugrep/broken
Searching for files in directory /home/chris/bugrep/broken/docs
Searching for files in directory /home/chris/bugrep/broken/mdfiles
Reading and parsing tag files
Reading /home/chris/bugrep/broken/mdfiles/structure.md...
======== Markdown =========
---- input -------
directory structure
---- output -----
directory structure

On 2012-03-23 11:38:36 +0000, Chris wrote:

Created attachment 210405
Proposed patch against doxygen-svn rev 808

I have attached a proposed patch that modifies markdown.cpp so that it always generates @image when processing the markdown syntax images. This is a patch against a copy of the SVN tree checked out this morning.

On 2012-03-24 11:55:42 +0000, Dimitri van Heesch wrote:

Hi Chris,

Thanks for the patch, but it should also be possible to use a URL or relative path to an image outside of the doxygen tree. So I propose the following patch.
Let me know if it works for you.

--- doxygen-svn/src/markdown.cpp 2012-03-17 21:38:24.000000000 +0100
+++ markdown.cpp 2012-03-24 12:48:58.000000000 +0100
@@ -750,11 +750,14 @@
}
else if (isImageLink)
{

  • if (link.find("@ref ")!=-1 || link.find("\ref ")!=-1)
  •    // assume doxygen symbol link
    
  • bool ambig;
  • FileDef *fd=0;
  • if (link.find("@ref ")!=-1 || link.find("\ref ")!=-1 ||
  •    (fd=findFileDef(Doxygen::imageNameDict,link,ambig))) 
    
  •    // assume doxygen symbol link or local image link
    
    {
    out.addStr("@image html ");
  •  out.addStr(link.mid(5));
    
  •  out.addStr(link.mid(fd ? 0 : 5));
     if (!explicitTitle && !content.isEmpty())
     { 
       out.addStr(" \"");
    

On 2012-03-24 13:30:49 +0000, Chris wrote:

Just tried it, and I can confirm that patch does the job! Thanks.

On 2012-05-19 12:26:57 +0000, Dimitri van Heesch wrote:

This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.1. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant.

@doxygen doxygen closed this Jul 2, 2018

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