[chat formatting] Add Variation Selector-16 as appropriate (#4105)

- Ensures consistent rendering across devices
  - See:
  https://unicode.org/Public/emoji/12.1/emoji-variation-sequences.txt
This commit is contained in:
Michael H 2020-07-23 13:40:25 -04:00 committed by GitHub
parent 676bf1bd60
commit 0d8a899a65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,7 +33,7 @@ def warning(text: str) -> str:
The new message.
"""
return "\N{WARNING SIGN} {}".format(text)
return "\N{WARNING SIGN}\N{VARIATION SELECTOR-16} {}".format(text)
def info(text: str) -> str:
@ -45,7 +45,7 @@ def info(text: str) -> str:
The new message.
"""
return "\N{INFORMATION SOURCE} {}".format(text)
return "\N{INFORMATION SOURCE}\N{VARIATION SELECTOR-16} {}".format(text)
def question(text: str) -> str:
@ -57,7 +57,7 @@ def question(text: str) -> str:
The new message.
"""
return "\N{BLACK QUESTION MARK ORNAMENT} {}".format(text)
return "\N{BLACK QUESTION MARK ORNAMENT}\N{VARIATION SELECTOR-16} {}".format(text)
def bold(text: str, escape_formatting: bool = True) -> str: