bot
bot copied to clipboard
Single newlines in tags get rendered as-is in Discord
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:
https://github.com/python-discord/bot/blob/13927ec4791a3f87193724ea3d1ac24143a8684c/bot/resources/tags/traceback.md?plain=1#L5-L8
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.