mgiesen / Image-Comments

The Image Comments Visual Studio Code extension lets you easily add visual comments such as sketches or diagrams directly into your source code, improving code documentation and understanding.
https://marketplace.visualstudio.com/items?itemName=mgiesen.image-comments
MIT License
9 stars 4 forks source link

Regexp problem if there is no comment in front of the image path #11

Open Lecrapouille opened 3 weeks ago

Lecrapouille commented 3 weeks ago

Hi !

Image comment v 1.1.0, Debian 12, VScode 1.93.0, C++ code

I always have the following error "Image Comments Could not find image"

I tried local and canonical paths, jpeg, png ;(

Have I missed apt-get install a lib?

// *****************************************************************************
//! \brief bla bla
//! [/home/qq/Bureau/foo.png]
// *****************************************************************************
struct Foo { ...

And there is no display and no message error with the following comment:

// [/home/qq/Bureau/foo.png]
struct Foo { ...
Lecrapouille commented 3 weeks ago

Oups 1/2 of my bad ;(

Paths to picture shall be local to the file!

Note: Initially I failed with my local path (the file really does not exist), that is why I tried canonical path.

BUT:

mgiesen commented 3 weeks ago

Thanks, that's a case I haven't tested. Are you able to make a pull request with a solution? Otherwise I take a look in a couple of days.

Lecrapouille commented 3 weeks ago

@mgiesen I'm sorry I've just looked quickly your code. For my case, I can deal with the actual behavior.