Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render codespans within link text. #68

Merged
merged 2 commits into from
May 16, 2024

Conversation

psobot
Copy link
Contributor

@psobot psobot commented May 14, 2024

Before this PR, the following Markdown:

[`foobar`](https://example.com)

...would be rendered in RestructuredText as:

``foobar` <https://example.com>`_

...which unfortunately does not parse and results in the link showing up as plain text in the output HTML.

This PR adds a special case for links whose text starts and ends with backticks, returning raw HTML instead that contains a manually-inserted <a> tag surrounding a <code> block and a <span class="pre">.

psobot added a commit to spotify/pedalboard that referenced this pull request May 14, 2024
@amyreese amyreese force-pushed the psobot/allow-linking-code-blocks branch from 341c081 to 71a122f Compare May 16, 2024 21:38
@amyreese amyreese merged commit cb32f17 into omnilib:main May 16, 2024
16 checks passed
@amyreese
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants