discord / discord-api-docs

Official Discord API Documentation
https://discord.com/developers/docs/intro
Other
5.9k stars 1.25k forks source link

Link masking fails when the to be displayed text starts with ordinal number and space #6565

Open sarkafa opened 9 months ago

sarkafa commented 9 months ago

Description

Link fails to be masked when the to be displayed text starts with an ordinal number followed by a period and a space. I did not find the answer in similar issue.

Steps to Reproduce

this do not work: curl -H "Content-Type: application/json" -d '{"content": "[1. text](<https://google.com>)"}' https://discord.com/api/webhooks/<discord_code>

this works: curl -H "Content-Type: application/json" -d '{"content": "[1.text](<https://google.com>)"}' https://discord.com/api/webhooks/<discord_code>

this also works curl -H "Content-Type: application/json" -d '{"content": "[text 1. text](<https://google.com>)"}' https://discord.com/api/webhooks/<discord_code>

Expected Behavior

To take the name as string and mask the link

Current Behavior

Now it fails to mask the link as shown on the attached screenshot.

Screenshots/Videos

image

Client and System Information

Ubuntu 20.04.6 LTS Mozilla Firefox 118.0.2

DV8FromTheWorld commented 8 months ago

I've got a fix for this in review.

DV8FromTheWorld commented 8 months ago

A fix for this has been merged. It will make its way out to Web canary in a few hours, and out to mobile clients after the winter break (first or second week of Jan).