Skip to content

Support nested inline markup properly #1043

@rgaiacs

Description

@rgaiacs

Describe the feature you'd like to request

I like to be able to use code block inside links in the final HTML, for example

<p><a href="https://github.com/jupyterhub/repo2docker"><code>repo2docker</code></a></p>

The above HTML can be created from the following Markdown

[`repo2docker`](https://github.com/jupyterhub/repo2docker)

that is compliant with original Markdown and CommonMark.

Unfortunately, MyST live preview converts the the above Markdown into

<p><a class="reference external" href="https://github.com/jupyterhub/repo2docker"><span class="docutils literal">repo2docker</span></a></p>
Image

docutils's FAQ includes

2.16 Is nested inline markup possible?

Not currently, no. It's on the to-do list (details here), and hopefully will be part of the reStructuredText parser soon.

This is a feature request that goes all the way back to 2001.

Describe the solution you'd like

[`repo2docker`](https://github.com/jupyterhub/repo2docker)

to produce

<p><a href="https://github.com/jupyterhub/repo2docker"><code>repo2docker</code></a></p>

Describe alternatives you've considered

docutils's FAQ recommends to use "raw" directive, i.e. use HTML directly. This is undesired as the feature is part of CommonMark.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions