You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ibus-typing-booster/SOURCES/avoid-verbatim-bidi-formatt...

49 lines
1.4 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

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