Skip to content

Commit 793c6cb

Browse files
feat: Accept non-breaking spaces as subsitutes for regular ones (#109)
Mostly relevant for French typists. Closes #108.
1 parent b97b792 commit 793c6cb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/text_utils.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ const ALIASES: &'static [(&'static str, &'static str)] = &[
4040
("’", "'"), // Typoographic apostrophe
4141
("\u{00A0}", "\u{0020}"), // Non-breaking spaces made typable as regular ones
4242
("\u{202F}", "\u{0020}"),
43+
("\u{0020}", "\u{00A0}"), // Vice versa
44+
("\u{0020}", "\u{202F}"),
4345
];
4446

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

0 commit comments

Comments
 (0)