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

Single newlines in tags get rendered as-is in Discord #3172

Open
n0Oo0Oo0b opened this issue Sep 13, 2024 · 0 comments
Open

Single newlines in tags get rendered as-is in Discord #3172

n0Oo0Oo0b opened this issue Sep 13, 2024 · 0 comments
Labels
a: frontend Related to output and formatting a: tags Related to bot tags s: planning Discussing details t: bug Something isn't working

Comments

@n0Oo0Oo0b
Copy link
Contributor

According to the markdown spec, lines separated by a single newline should be joined with a space.

Discord embeds doesn't seem to respect this, as demonstrated by the !traceback tag:

Please provide the full traceback for your exception in order to help us identify your issue.
While the last line of the error message tells us what kind of error you got,
the full traceback will tell us which line, and other critical information to solve your problem.
Please avoid screenshots so we can copy and paste parts of the message.

image

We could resolve this by formatting paragraphs on a single line, but I think joining the lines manually as the tag is loaded is better (something along the lines of re.sub(r"(?<!\n)\n(?!\n)", " ", content)) since it leaves open more formatting options.

@n0Oo0Oo0b n0Oo0Oo0b added t: bug Something isn't working a: frontend Related to output and formatting s: planning Discussing details a: tags Related to bot tags labels Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: frontend Related to output and formatting a: tags Related to bot tags s: planning Discussing details t: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant