Skip to content

Commit

Permalink
feat: Accept non-breaking spaces as subsitutes for regular ones (#109)
Browse files Browse the repository at this point in the history
Mostly relevant for French typists. Closes #108.
  • Loading branch information
bragefuglseth authored Feb 14, 2025
1 parent b97b792 commit 793c6cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/text_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ const ALIASES: &'static [(&'static str, &'static str)] = &[
("’", "'"), // Typoographic apostrophe
("\u{00A0}", "\u{0020}"), // Non-breaking spaces made typable as regular ones
("\u{202F}", "\u{0020}"),
("\u{0020}", "\u{00A0}"), // Vice versa
("\u{0020}", "\u{202F}"),
];

// The largest grapheme count of any current alias, manually kept track of for performance reasons.
Expand Down

0 comments on commit 793c6cb

Please sign in to comment.