Skip to content

Commit

Permalink
fix(clafrica): whitespaces as alowed chacracters
Browse files Browse the repository at this point in the history
Now, the user is able to use code who contains spaces
  • Loading branch information
pythonbrad committed Jul 10, 2023
1 parent f197edd commit 5038af6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clafrica/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 5038af6

Please sign in to comment.