How to find reliably an image and its use in a Markdown file

In an indexed folder I have a Markdown file First Ride With the New Kick Scooter.md containing the line

![Mibo Mastr in yellow](_assets/Mibo_Mastr_in_yellow_IMG_0197.jpg)

and in the sub folder _assets I have the image file

Mibo_Mastr_in_yellow_IMG_0197.jpg

How can I create a search in DEVONthink which finds these two files?

I tried the search query Mibo_Mastr_in_yellow_IMG_0197, but this finds only the image, not the Markdown file.

Many thanks for any pointers!


PS: The need to find these file “pairs” arises quite frequently (e.g. to find orphaned images, etc) and I think I have asked about this before, but I cannot find the thread…

I use this smart rule, which works for me:

Stephen

Cool! Thanks. :smile: That’s great for the particular case of searching for orphaned images.

Is there a way to find pairs as well? Can I do it with the Search syntax? (That’s what I use most of the time.)

The need to find these file “pairs” arises quite frequently

Why?


And that link isn’t part of the rendered Markdown do it’s not indexed as content. (This has been covered more than once on the forums. )

If you want to search the code of Markdown, you need to enable the hidden preference IndexRawMarkdownSource. You’ll also need to rebuild the database to index the source of existing Markdiwn files.

1 Like

Ah! That is what I was looking for. Thanks a lot! (And now with " IndexRawMarkdownSource" as search term I found the old thread too.