I want to programmatically generate markdown for a cell in a Pluto notebook to display a series of images. The following hard-coded markdown works. src is a list of local image files.
md"""
$(LocalResource(src[1]))
"""
If I do this programmatically it interprets the image as text.
I don’t know the specifics, but it could be that the type of LocalResource has different show methods for String and Markdown.
When you write "$(something)" then Julia tries to make sense of something as a String and when you write md"$(something)" then Julia tries to make sense of something as a Markdown string.
How is the md""" Something """ syntax parsed? It only partially interprets the contained text. md"""\n$(LocalResource(src[1]))""" will load the resource but the \n will show up as \n.