Skip to content

Conversation

HTGAzureX1212
Copy link
Member

Closes #2279.

This draft PR explores a potential implementation for markdown formatting functions. It is expected that the implementation would be iterated on for a bit before this is actually merged into main.

@HTGAzureX1212 HTGAzureX1212 added w-do-not-merge PR is blocked or deferred w-unapproved Proposal for change has *not* been approved by @twilight-rs/core. w-needs-more-docs Needs more documentation before being worked on. labels Feb 14, 2024
@HTGAzureX1212 HTGAzureX1212 self-assigned this Feb 14, 2024
@github-actions github-actions bot added c-util Affects the util crate t-feature Addition of a new feature labels Feb 14, 2024
Copy link
Member

@Gelbpunkt Gelbpunkt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also missing spoilers and code blocks (perhaps even more that I didn't think of).

@HTGAzureX1212 HTGAzureX1212 requested a review from Gelbpunkt May 6, 2024 00:36
@HTGAzureX1212
Copy link
Member Author

Do you think we need to add the H1, H2, H3, ... formatting?

@laralove143
Copy link
Member

Do you think we need to add the H1, H2, H3, ... formatting?

yes, i think this should support all of discord's supported markdown, including named links and timestamps

@HTGAzureX1212
Copy link
Member Author

Do you think we need to add the H1, H2, H3, ... formatting?

yes, i think this should support all of discord's supported markdown, including named links and timestamps

Promptly added.

@Gelbpunkt
Copy link
Member

I don't think this implementation suffices. It currently has two major issues:

  1. It doesn't escape properly, which IMO is the main reason to even use these helpers instead of simply wrapping the text yourself
  2. It doesn't handle multi-line text properly for some cases like block quotes, where each line needs to be prepended individually

@HTGAzureX1212
Copy link
Member Author

I'll look into those

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

Labels

c-util Affects the util crate t-feature Addition of a new feature w-do-not-merge PR is blocked or deferred w-needs-more-docs Needs more documentation before being worked on. w-unapproved Proposal for change has *not* been approved by @twilight-rs/core.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Formatter macros

4 participants