Skip to content

Button directive does not support Markdown link references #3442

@theletterf

Description

@theletterf

Describe the bug

When using the button directive with a Markdown link reference, such as:

:::{button}
[Open][kibana-url]
:::

kibana-url: <https://foo.example.com>

docs-builder throws the following error:

Button directive must contain only a single Markdown link. Use: :::{button}
[text](url)
:::

It appears that only raw links in the form [text](url) are supported, and link reference syntax [text][id] is not processed. This is valid Markdown and should be supported.

Expected behavior

The button directive should accept both raw Markdown links and Markdown link references. The example above should render a functional button just like a direct link.

Steps to reproduce

Steps to reproduce:

  1. Use the following snippet in a doc file:
    :::{button}
    [Open][kibana-url]
    :::
    
    kibana-url: <https://foo.example.com>
  2. Build the documentation with docs-builder.
  3. Observe the error: Button directive must contain only a single Markdown link.

Tooling

true,false,false

View original Slack conversation

Metadata

Metadata

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions