From 5038af6ed040ff69b7c0c7ba7e2d7a8ef1c26519 Mon Sep 17 00:00:00 2001 From: Fomegne Brady Date: Mon, 10 Jul 2023 09:06:33 +0100 Subject: [PATCH] fix(clafrica): whitespaces as alowed chacracters Now, the user is able to use code who contains spaces --- clafrica/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clafrica/src/lib.rs b/clafrica/src/lib.rs index b05db18..291ff54 100644 --- a/clafrica/src/lib.rs +++ b/clafrica/src/lib.rs @@ -61,8 +61,8 @@ pub fn run(config: config::Config, mut frontend: impl Frontend) -> Result<(), io for event in rx.iter() { let character = event.name.and_then(|s| s.chars().next()); let is_valid = character - .map(|c| c.is_alphanumeric() || c.is_ascii_punctuation()) - .unwrap_or_default(); + .map(|c| c.is_alphanumeric() || c.is_ascii_punctuation() || c.is_whitespace()) + .unwrap_or(false); match event.event_type { EventType::KeyPress(E_Key::Backspace) => {