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

Improvement(?): Write our own inline/Discord markdown parser. #23

Open
a2aaron opened this issue Jul 7, 2022 · 1 comment
Open

Improvement(?): Write our own inline/Discord markdown parser. #23

a2aaron opened this issue Jul 7, 2022 · 1 comment
Labels
enhancement New feature or request rust This is an issue related to the Rust library

Comments

@a2aaron
Copy link
Owner

a2aaron commented Jul 7, 2022

Right now, we have to fight pulldown_cmark on a bunch of stuff, because it's trying to do a bunch of stuff for parsing Markdown. This includes

  • eating newlines
  • adding <p> tags to messages
  • using <pre> and <code> instead of a <span> that we can style
  • not handling underline

This is annoying and suggests that we might be better off writing our own markdown parser. This doesn't need to implement the whole Markdown spec, but instead just the inline formatting stuff (and probably doesn't even need to be super good at it's job, so long as it can get most of the cases). This would make handling blank newlines much easier as well.

@a2aaron
Copy link
Owner Author

a2aaron commented Jul 7, 2022

Implementing this would make #14 and #15 much easier to implement as well.

@a2aaron a2aaron added rust This is an issue related to the Rust library enhancement New feature or request labels Jul 7, 2022
@a2aaron a2aaron added this to the Better Markdown Parsing milestone Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request rust This is an issue related to the Rust library
Projects
None yet
Development

No branches or pull requests

1 participant