Skip to content

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

Open

Description

@salty-tree

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.

Activity

  1. added
    t: bugSomething isn't working
    a: frontendRelated to output and formatting
    a: tagsRelated to bot tags
    on Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: frontendRelated to output and formattinga: tagsRelated to bot tagss: planningDiscussing detailst: bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions