mirror of
https://github.com/googlefonts/noto-emoji.git
synced 2025-06-08 15:57:59 +00:00
Simplify rtl sequence code
Co-authored-by: Cosimo Lupo <clupo@google.com>
This commit is contained in:
parent
9de9cd37cc
commit
06ce521969
1 changed files with 2 additions and 7 deletions
|
@ -228,14 +228,9 @@ def get_rtl_seq(seq):
|
|||
|
||||
rev_seq = list(seq)
|
||||
rev_seq.reverse()
|
||||
starts_with_fp = is_fitzpatrick(rev_seq[0])
|
||||
for i in range(1, len(rev_seq)):
|
||||
if i == 2 and starts_with_fp:
|
||||
continue
|
||||
for i in range(len(rev_seq)-1, 0, -1):
|
||||
if is_fitzpatrick(rev_seq[i-1]):
|
||||
tmp = rev_seq[i]
|
||||
rev_seq[i] = rev_seq[i-1]
|
||||
rev_seq[i-1] = tmp
|
||||
rev_seq[i-1], rev_seq[i] = rev_seq[i], rev_seq[i-1]
|
||||
return tuple(rev_seq)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue