giuspen / cherrytree

cherrytree
https://www.giuspen.net/cherrytree/
Other
3.3k stars 458 forks source link

Import From Markdown File does not import png image with relative path. #2537

Open poleguy opened 4 days ago

poleguy commented 4 days ago

Version, Operating system cherrytree 1.1.4 on ubuntu 22.04

Describe the bug Importing a .md file that includes a .png image does not import or render the image. I checked the source code, and I see that there is code to import images, so I expect it to work. There are no obvious error or warning messages.

There is no problem if the image has an absolute path e.g. /tmp/test.png

It would be nice to have relative paths work because the .md document can't be moved if absolute paths are used.

To Reproduce

  1. Create a test.md file with:
    text before
    ![alt](./test.png)
    text after

2 Create a test.png file in the same directory

  1. File->Import->From Markdown File
  2. Select File. Click Open. Select The Tree Root. Click OK.
  3. Expect to see image. Instead only see alt text. Screenshots If applicable, add screenshots to help explain your problem. image