AsciidocFX icon indicating copy to clipboard operation
AsciidocFX copied to clipboard

Incorrect relative path when performing "paste converted"

Open 3rady opened this issue 1 year ago • 1 comments

I am using AsciidocFX version 1.8.9 on Windows.

When using the "paste converted" function to add images to a document/project, AsciidocFX seems to be adding an extra (and incorrect) ../ (or go up one directory in the tree) prefix to the path of the image file. This does not seem to bother AsciidocFX, but when I use the same document with other tools (asciidoctor), the other tools do not accept the path.

Here is an example:

  1. Create a new folder C:\Temp\AsciidocFX-Test and set it as your work directory in AsciidocFX.
  2. Create a new document called Index.adoc in the work directory and open it.
  3. From another application, copy an image to the Windows clipboard.
  4. Right-click within the edit window for Index.adoc and select Paste converted.
  5. This creates folder C:\Temp\AsciidocFX-Test\images and places the new image file there, which is expected.
  6. For me, image::../images/Image-190624-032332.809.png[] was inserted into my document

I assert that the relative path to the image file from the Index.adoc's location should be images/Image-190624-032332.809.png (or ./images/Image-190624-032332.809.png). In order to get other tools to successfully process my documents, I must first manually edit the paths (to remove the extra ../ prefix) from all image files I have added, which is often quite a lot.

3rady avatar Jun 19 '24 22:06 3rady