URLs containing 'link:' not processed in 'image::' - bug?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

URLs containing 'link:' not processed in 'image::' - bug?

wolandscat
This post was updated on .
Most of the URLs I use are built using variables in a special file. I generally have a variable representing our main website which used to be blank, so that URLs of the form {openehr_site}/releases/latest/RM/... would just come out to be /releases/latest etc.

This is usually ok, but in a reasonable number of cases, mainly in complex tables, it turned out to be better to define :openehr_site: as link:, which results in asciidoctor source like link:/releases/latest/RM/..., which gets processed properly to '/releases/etc/...', including in cases where the link URL syntax would otherwise be ambiguous.

Except in one case - where the variable expression appears in 'image::'.

In that case, the generated HTML still has the 'link:' in it, which of course doesn't work in HTML. E.g.:

<img src="link:/releases/SM/latest/docs/UML/diagrams/SM-platform_model.svg" alt="SM platform model">

This seems like a bug to me... anyone else come across this?

The use case is including an image from another doc, from its published HTML location (i.e. not from the source file area).