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

feat(Util): escape more markdown characters #8701

Merged
merged 5 commits into from Oct 10, 2022
Merged

Conversation

RedGuy12
Copy link
Contributor

@RedGuy12 RedGuy12 commented Oct 4, 2022

Please describe the changes this PR makes and why it should be merged:
Allows for escaping more characters in escapeMarkdown and adds the corresponding individual functions:

I enabled the escapeEscapes option by default since you can add those to any message, but since lists, headings, and masked links are only supported in specific contexts I disabled them by default. The escapeMarkdown function now returns different information by default because escapeEscapes is enabled by default. If this is a problem, I can disable it by default until the next major release.

Status and versioning classification:

  • This PR changes the library's interface (methods or parameters added)
  • This PR includes potentially breaking changes (methods removed or renamed, parameters moved or removed)
  • I know how to update typings and have done so, or typings don't need updating

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
@vercel
Copy link

vercel bot commented Oct 4, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
discord-js ✅ Ready (Inspect) Visit Preview Oct 10, 2022 at 5:20AM (UTC)
discord-js-guide ✅ Ready (Inspect) Visit Preview Oct 10, 2022 at 5:20AM (UTC)

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
packages/discord.js/src/util/Util.js Outdated Show resolved Hide resolved
Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Oct 6, 2022

Codecov Report

Merging #8701 (a7bb52b) into main (3ed668e) will increase coverage by 0.03%.
The diff coverage is n/a.

❗ Current head a7bb52b differs from pull request most recent head 49788aa. Consider uploading reports for the commit 49788aa to get more accurate results

@@            Coverage Diff             @@
##             main    #8701      +/-   ##
==========================================
+ Coverage   86.83%   86.86%   +0.03%     
==========================================
  Files          87       87              
  Lines        8810     8815       +5     
  Branches     1117     1103      -14     
==========================================
+ Hits         7650     7657       +7     
+ Misses       1118     1116       -2     
  Partials       42       42              
Flag Coverage Δ
builders 100.00% <ø> (ø)
collection 100.00% <ø> (ø)
proxy 81.53% <ø> (ø)
rest 92.07% <ø> (+<0.01%) ⬆️
util 100.00% <ø> (ø)
utilities 100.00% <ø> (ø)
voice 63.83% <ø> (+0.12%) ⬆️
ws 59.89% <ø> (+0.13%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/rest/src/lib/utils/constants.ts 100.00% <0.00%> (ø)
...ackages/voice/src/util/generateDependencyReport.ts 0.00% <0.00%> (ø)
packages/ws/src/utils/constants.ts 85.07% <0.00%> (+1.20%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

escapeMarkdown does not escape backslashes
6 participants