Skip to content

Add support for image titles #45

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

Merged
merged 1 commit into from
May 23, 2022

Conversation

nvanexan
Copy link
Contributor

Adding support for image titles per CommonMark Spec: https://spec.commonmark.org/0.30/#example-571

This can be used downstream to wrap images with <figure> elements and with <figcaption> elements for the title where the attributes return a title.

Example:

![foo](/url "title")
<figure>
   <img src="/url" alt="foo" />
   <figcaption>title</figcaption>
</figure>

Copy link
Contributor

@rpaul-stripe rpaul-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing! This looks good to me. 👍

@mfix-stripe mfix-stripe merged commit 33d61ee into markdoc:main May 23, 2022
@nvanexan nvanexan deleted the image-title-attributes branch May 23, 2022 23:23
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.

3 participants