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

Request: Add image URLs to link reference definitions #71

Open
NfNitLoop opened this issue Feb 7, 2025 · 1 comment
Open

Request: Add image URLs to link reference definitions #71

NfNitLoop opened this issue Feb 7, 2025 · 1 comment

Comments

@NfNitLoop
Copy link

This is sortof a follow up to #15. I'm still using this library years later! 😊

Link reference definitions are working great, except for one cumbersome edge case, images.

Given this input:

<a href="VERY_LONG_URL"><img src="VERY_LONG_URL"/></a>

With useLinkReferenceDefinitions enabled, we get this output:

[![](VERY_LONG_URL)][1]

[1]: VERY_LONG_URL

The VERY_LONG_URL is duplicated, when we could have instead used a link reference for both:

[![][1]][1]

[1]: VERY_LONG_URL
@NfNitLoop
Copy link
Author

If you're open to a PR w/ this change, let me know!

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

No branches or pull requests

1 participant