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

Discord mention support #29

Merged
merged 5 commits into from
Dec 21, 2024
Merged

Discord mention support #29

merged 5 commits into from
Dec 21, 2024

Conversation

nint8835
Copy link
Member

Resolves #28

This PR implements a new Goldmark extension to handle Discord mentions of the format <@ID>, resolving them to the user's username. It is designed to reduce work done (it fetches each ID only once per program execution, caching resolved values), and to fail gracefully (rendering the raw mention in the event the ID fails to resolve or the credentials for the resolver are not provided.

This has been tested by adding a mention to my page in the example content, which is confirmed to work correctly
image

@nint8835 nint8835 requested a review from jackharrhy December 21, 2024 22:18
@nint8835 nint8835 merged commit 434f5d5 into main Dec 21, 2024
1 check passed
@jackharrhy jackharrhy deleted the discord-mention-support branch December 21, 2024 22:37
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.

Create markdown extension for Discord IDs
2 participants