ibus-typing-booster/avoid-verbatim-bidi-formatting-characters-in-the-source.patch

49 lines
1.4 KiB
Diff
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

diff -ru ibus-typing-booster-2.1.0.orig/engine/itb_util.py ibus-typing-booster-2.1.0/engine/itb_util.py
--- ibus-typing-booster-2.1.0.orig/engine/itb_util.py 2018-07-24 08:43:58.000000000 +0200
+++ ibus-typing-booster-2.1.0/engine/itb_util.py 2023-10-09 18:24:53.617131025 +0200
@@ -1757,6 +1757,9 @@
TR9> and its matching PDI or, if it has no matching PDI, the end of the
TR9> paragraph
+ U+2069 POP DIRECTIONAL ISOLATE
+ U+2068 FIRST STRONG ISOLATE
+
Examples:
>>> is_right_to_left('Hallo!')
@@ -1765,16 +1768,16 @@
>>> is_right_to_left('﷼')
True
- >>> is_right_to_left('⁨﷼⁩')
+ >>> is_right_to_left('\u2068﷼\u2069')
False
- >>> is_right_to_left('⁨﷼⁩﷼')
+ >>> is_right_to_left('\u2068﷼\u2069﷼')
True
- >>> is_right_to_left('a﷼')
+ >>> is_right_to_left('a\u2068﷼\u2069﷼')
False
- >>> is_right_to_left('a﷼')
+ >>> is_right_to_left('\u2068a\u2069\u2068﷼\u2069﷼')
True
'''
skip = False
@@ -1806,10 +1809,10 @@
Examples:
>>> bidi_embed('a')
- 'a'
+ '\u202Aa\u202C'
>>> bidi_embed('﷼')
- '‫﷼‬'
+ '\u202B﷼\u202C'
'''
if is_right_to_left(text):
return chr(0x202B) + text + chr(0x202C) # RLE + text + PDF
ibus-typing-booster-2.1.0/engine のみに存在: itb_util.py.orig