Skip to content

Commit

Permalink
escape backticks in charinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
lmaotrigine committed Jan 7, 2024
1 parent 3c28039 commit 473bc08
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cogs/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ async def charinfo(self, ctx: Context, *, characters: str) -> None:
def to_string(c):
digit = f'{ord(c):x}'
name = unicodedata.name(c, 'Name not found.')
c = '\\`' if c == '`' else c
return f'[`\\U{digit:>08}`](<http://www.fileformat.info/info/unicode/char/{digit}>): {name} **\N{EM DASH}** {c}'

msg = '\n'.join(map(to_string, characters))
Expand Down

0 comments on commit 473bc08

Please sign in to comment.