Skip to content

Commit

Permalink
Merge pull request #6 from sloganking/master
Browse files Browse the repository at this point in the history
add space only after Latin script punctuation.
  • Loading branch information
sloganking authored Oct 25, 2023
2 parents c1405e3 + 3d47524 commit 690f098
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,16 +407,12 @@ fn main() -> Result<(), Box<dyn Error>> {
}
};

// if let Some(last_char) = transcription.chars().last() {
// if last_char != '.'
// && last_char != '?'
// && last_char != '!'
// && last_char != ','
// {
// transcription.push('.');
// }
// }
transcription.push(' ');
if let Some(last_char) = transcription.chars().last() {
if ['.', '?', '!', ','].contains(&last_char) {
println!("adding space to end of transcription");
transcription.push(' ');
}
}

enigo.key_sequence(&transcription);
} else {
Expand Down

0 comments on commit 690f098

Please sign in to comment.