commit 1c6e356a6e34c8b9a2baeaa79225938c5371a8f5 from: Omar Polo date: Sat Jul 17 17:07:48 2021 UTC don't treat sequences of numbers as emoji commit - 87e3e8018ef2858201ca3641eff06e130ea3ccd9 commit + 1c6e356a6e34c8b9a2baeaa79225938c5371a8f5 blob - 3de3c04eff0a487493ed6053d58c6a1d50b4299a blob + 9870671bd2882a3cc8bac637de373ab746a55c98 --- utf8.c +++ utf8.c @@ -227,6 +227,7 @@ int emojied_line(const char *s, const char **space_ret) { uint32_t cp = 0, state = 0; + int only_numbers = 1; for (; *s; ++s) { if (!decode(&state, &cp, *s)) { @@ -234,10 +235,12 @@ emojied_line(const char *s, const char **space_ret) continue; if (cp == ' ') { *space_ret = s; - return 1; + return !only_numbers; } if (!is_emoji(cp)) return 0; + if (cp < '0' || cp > '9') + only_numbers = 0; } }