Add support for the inline option on an SVG image reference
Consider the case of an SVG image reference (the target of an image macro is an SVG) and the inline
option is set (i.e., opts=inline
) on the macro.
image::class-diagram.svg[opts=inline]
In this case, the AsciiDoc processor will attempt to read the SVG data and add it directly to the HTML. (See https://docs.asciidoctor.org/asciidoc/latest/macros/image-svg/#options-for-svg-images). However, this functionality currently fails in Antora, resulting in the following obscure error:
FATAL (antora): Jail is not an absolute path: modules/ROOT/pages
This failure happens since the method that the processor calls is not aware of Antora's virtual file system. The failure is problematic for two reasons. It prevents the generator from producing a working site over a single problematic image. Second, it doesn't provide the user with any useful information about what is wrong or where the source of the problem is.
Antora must override the method that reads the SVG data so it can locate and read the SVG from Antora's content catalog.
If the image cannot be found or read for some reason, it should only result in the normal warning message about a missing image.