Skip to content

Links are not rendered in card titles #28

@choldgraf

Description

@choldgraf

Describe the problem

I have a re-work of the Jupyter Book homepage here:

jupyter-book/jupyter-book#1442

However, I discovered that links in card titles don't seem to be rendered. For example, here's an example of some non-link + link text in a card title:

https://github.com/executablebooks/jupyter-book/pull/1442/files#diff-22760d417a52c66f14bee182587d458d0737a616dd14cb09748b4c725fc5809fR33-R42

relevant MD here:

:::{grid-item-card} **TEST** [Publication-quality content](file-types:markdown) ✍
Write in either Jupyter Markdown, MyST Markdown for more [publishing features](content/myst), [reStructuredText](file-types:rst), [Jupyter Notebooks](file-types:notebooks), or [any Jupytext format](file-types:custom).
Includes support for rich syntax such as [citations and cross-references](content/citations), [math and equations](content/math), and [figures](content/figures).
:::

and it is rendered like this:

image

Link to your repository or website

Check out the preview in jupyter-book/jupyter-book#1442

Steps to reproduce

Go to jupyter-book/jupyter-book#1442

Click on the preview

Look at the cards, notice that only the emojis are displayed in title, not links

Extra info

I know that you can turn the whole card into a clickable link, but I don't want to do that here because there are multiple links within the card body as well.

I think that the fix for this would be somewhere around:

textnodes, _ = inst.state.inline_text(arguments[0], inst.lineno)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions