From 79cad76cba146c1a52aa57ac3c1a22e40a2bb9d2 Mon Sep 17 00:00:00 2001 From: Fabian Winter <5821180+fdw@users.noreply.github.com> Date: Mon, 23 Mar 2020 18:20:12 +0100 Subject: [PATCH] Fix whitespace characters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `split()` will remove the poor whitespace characters, even though they're exactly what you wanted. So now we only `split` with spaces. Thanks to @polyzen for finding the problem 🙂 --- CHANGELOG.md | 4 ++++ picker/rofimoji.py | 4 ++-- setup.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9c11df..1566928 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# [4.1.1] +## Fixed +- Whitespace characters can be inserted + # [4.1.0] ## Changed - The extractors have been rewritten: There are now many, *many* supported symbols (all that Unicode offers), but some may have been renamed. diff --git a/picker/rofimoji.py b/picker/rofimoji.py index 9087bc0..7dff16e 100755 --- a/picker/rofimoji.py +++ b/picker/rofimoji.py @@ -66,7 +66,7 @@ def parse_arguments() -> argparse.Namespace: default_config_files=[os.path.join(directory, 'rofimoji.rc') for directory in BaseDirectory.xdg_config_dirs] ) - parser.add_argument('--version', action='version', version='rofimoji 4.1.0') + parser.add_argument('--version', action='version', version='rofimoji 4.1.1') parser.add_argument( '--insert-with-clipboard', '-p', @@ -190,7 +190,7 @@ def process_chosen_characters( ) -> str: result = "" for line in chosen_characters: - character = line.decode('utf-8').split()[0] + character = line.decode('utf-8').split(" ")[0] if character in skin_tone_selectable_emojis: character = select_skin_tone(character, skin_tone, rofi_args) diff --git a/setup.py b/setup.py index facb809..0fd5d24 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='rofimoji', - version='4.1.0', + version='4.1.1', description='Simple character picker using rofi', author='fdw', author_email='5821180+fdw@users.noreply.github.com',