Skip to content

Add inline image support to svg macro; attempt feature parity with built-in image: and image:: macros #143

@eric-schneider

Description

@eric-schneider

Note: The goal of this ticket is to allow the svg macro to be used for inline images. This is not to be confused with the opts=inline SVG attribute, which the svg macro already uses by default.

The svg macro syntax currently supports inline usage (svg:) and block usage (svg::). However, it appears that the macro only truly supports block images. This limits the macro's versatility and causes confusion for writers when the inline usage produces unexpected results.

Inline image support

There are cases where we'd like to be able to use the macro for inline images. For example, to achieve a table that looks like the following:

image

You would expect the syntax to look like this:

|===
|Embedding provider |External |Astra-hosted |Docs

|svg:ROOT:ui/icons/microsoft-azure-openai.svg[] Azure OpenAI <-- Macro inline with text
|[.material-icons]#check#
|
|xref:integrations:embedding-providers/azure-openai.adoc[Get started]
|===

However, because the macro generates a block image, the inline text gets bumped down into a new paragraph below the icon:

image

Feature parity with built-in image:: and image: macros

It would be ideal if the svg: and svg:: macro usages mirrored their image: and image:: counterparts in terms of their supported attributes and values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions