Mastodon accepts backticks on URLs if it is in front of a slash /
This is problematic when the user wants to post a single-line markdown with a URL at the end
Yeah, this is a URL `https://ayco.io/`
... because then Mastodon will create a link node and, if the URL is long, will truncate it
It should be fine if there is no slash / as in the screenshot
Suggested solution
If we want to give the user a single-line markdown with a URL at the end, we might need to check the link node and display the value of the href property.
However there may be a scenario when the typed url is not the same as the href, because when Mastodon formats a URL as a link, it queries this link first and puts the final URL it resolves to into the href prop
I'll try to look for an example (I saw one before 🤣)
Alternative
An alternative will be to report this to Mastodon, if they will consider ignoring backticks in front of slashes in a URL 😔
Clear and concise description of the problem
Mastodon accepts backticks on URLs if it is in front of a slash
/
This is problematic when the user wants to post a single-line markdown with a URL at the end
... because then Mastodon will create a link node and, if the URL is long, will truncate it
It should be fine if there is no slash
/
as in the screenshotSuggested solution
If we want to give the user a single-line markdown with a URL at the end, we might need to check the link node and display the value of the
href
property.However there may be a scenario when the typed url is not the same as the
href
, because when Mastodon formats a URL as a link, it queries this link first and puts the final URL it resolves to into thehref
propI'll try to look for an example (I saw one before 🤣)
Alternative
An alternative will be to report this to Mastodon, if they will consider ignoring backticks in front of slashes in a URL 😔
Additional context
Related discord conversation: https://discord.com/channels/1044887051155292200/1045308117119946784/1063492629007962132