Skip to content

Commit 9127fd2

Browse files
authored
Merge pull request #3 from MarkusH/master
Only strip leading zeros from code point
2 parents 171d4e3 + 90813a9 commit 9127fd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

emojificate/filter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def tag(a, b):
1515
def convert(char):
1616
if unicodedata.category(char) == "So":
1717
name = unicodedata.name(char).title()
18-
code = char.encode("unicode_escape").decode("utf-8")[2:].strip("0")
18+
code = char.encode("unicode_escape").decode("utf-8")[2:].lstrip("0")
1919
return "".join([
2020
"<img",
2121
tag(" src", cdn + code + cdn_ft),

0 commit comments

Comments
 (0)