disnake icon indicating copy to clipboard operation
disnake copied to clipboard

fix: escape headers and unordered lists in markdown utils

Open onerandomusername opened this issue 1 year ago • 2 comments

Summary

Expanded markdown support in remove markdown and escape markdown methods. This does not currently support ordered lists, unfortunately.

Checklist

  • [x] If code changes were made, then they have been tested
    • [ ] I have updated the documentation to reflect the changes
    • [x] I have formatted the code properly by running pdm lint
    • [x] I have type-checked the code by running pdm pyright
  • [ ] This PR fixes an issue
  • [ ] This PR adds something new (e.g. new method or parameters)
  • [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • [ ] This PR is not a code change (e.g. documentation, README, ...)

onerandomusername avatar Jun 19 '23 19:06 onerandomusername

This replaces # and - anywhere in a string, not only at the start of a line

Seems like something that could use a bunch of testing, so moving it to the next version might make sense here.

Sigh, that's fair. Possibly can be part of a bugfix release, like 2.9.1

onerandomusername avatar Jun 20 '23 07:06 onerandomusername

Due to more quirks with the client this entire implementation is wrong.

onerandomusername avatar Jun 27 '23 03:06 onerandomusername