You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wasn't sure if this counts as a bug or a feature suggestion, but I expected escapeMarkdown to also escape the \ character, and it does not, leaving me to have to write .replace(/\\/g, '\\\\') everywhere I call escapeMarkdown (or a function of my own that does the same).
There should perhaps also be a separate function for only escaping backslashes, like escapeEscapes.
Code sample
const{ escapeMarkdown }=require('discord.js');console.log(escapeMarkdown('\\'));// Outputs '\\' instead of '\\\\'
Package version
14.5.0
Node.js version
16.13.2
Operating system
Windows
Priority this issue should have
Low (slightly annoying)
Which partials do you have configured?
No Partials
Which gateway intents are you subscribing to?
No Intents
I have tested this issue on a development release
No response
The text was updated successfully, but these errors were encountered:
Which package is this bug report for?
discord.js
Issue description
I wasn't sure if this counts as a bug or a feature suggestion, but I expected
escapeMarkdown
to also escape the\
character, and it does not, leaving me to have to write.replace(/\\/g, '\\\\')
everywhere I callescapeMarkdown
(or a function of my own that does the same).There should perhaps also be a separate function for only escaping backslashes, like
escapeEscapes
.Code sample
Package version
14.5.0
Node.js version
16.13.2
Operating system
Windows
Priority this issue should have
Low (slightly annoying)
Which partials do you have configured?
No Partials
Which gateway intents are you subscribing to?
No Intents
I have tested this issue on a development release
No response
The text was updated successfully, but these errors were encountered: