Skip to content

Escape nicknames in patrick responses. - #67

Open
JoBeGaming wants to merge 4 commits into
OpenRedstoneEngineers:mainfrom
JoBeGaming:escape-usernames
Open

Escape nicknames in patrick responses.#67
JoBeGaming wants to merge 4 commits into
OpenRedstoneEngineers:mainfrom
JoBeGaming:escape-usernames

Conversation

@JoBeGaming

Copy link
Copy Markdown
Contributor

See https://discord.com/channels/116914772766752769/165640273810948097/1544019167798239233 for embeds, and https://discord.com/channels/116914772766752769/1216162486152335471/1544010187546038282 as well as https://discord.com/channels/116914772766752769/1216162486152335471/1544010104511266841 for nickame usage in normal commands.

For tests, the output of the test attached was sent in https://discord.com/channels/116914772766752769/165640273810948097/1544010979694608516, and seems to raise no issues with Discord Markdown. See https://discord.com/channels/116914772766752769/165640273810948097/1544023339042087113 for tests related to links. Note that I've not implemented direct link escaping (https://www.youtube.com) yet.

assert escape_username("> job") == r"\> job"
assert escape_username("*job*") == r"\*job\*"
assert escape_username("**job**") == r"\*\*job\*\*"
assert escape_username("_job_") == r"\_job\_"
assert escape_username("__job__") == r"\_\_job\_\_"
assert escape_username("`job`") == r"\`job\`"
assert escape_username("> job") == r"\> job"
assert escape_username("~~job~~") == r"\~\~job\~\~"
assert escape_username("||job||") == r"\|\|job\|\|"

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant