disnake
disnake copied to clipboard
fix: escape headers and unordered lists in markdown utils
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, ...)
This replaces
#
and-
anywhere in a string, not only at the start of a lineSeems 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
Due to more quirks with the client this entire implementation is wrong.