mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-05 01:38:44 +00:00
more things to remove
This commit is contained in:
1 parent
f0ea7be729
commit
4e9919f5a2
1 file changed
+28
@@ -55,6 +55,34 @@ static REPLACEMENTS : Lazy<HashMap<String, String>> = Lazy::new(|| {
|
||||
map.insert("\u{BA}".to_string(), "o".to_string()); // Masculine ordinal
|
||||
// Misc characters that frequently occur
|
||||
map.insert("\u{203C}".to_string(), "!!".to_string()); // Double Exclamation Mark
|
||||
|
||||
// Close enough to existing allowed punctuation
|
||||
let punctuation = [
|
||||
("\u{3002}", "."), // idiographic full stop
|
||||
];
|
||||
|
||||
map.extend(punctuation.iter()
|
||||
.map(|(k, v)| (k.to_string(), v.to_string())));
|
||||
|
||||
// Symbols we can insert as words
|
||||
let phonetic_replacements = [
|
||||
("\u{B0}", " degrees "), // degree sign
|
||||
("\u{03C0}", " pie "), // greek small letter pi
|
||||
("\u{2122}", " trademark "), // trade mark sign
|
||||
];
|
||||
|
||||
map.extend(phonetic_replacements.iter()
|
||||
.map(|(k, v)| (k.to_string(), v.to_string())));
|
||||
|
||||
// These shouldn't be in the output at all
|
||||
let remove_replacements = [
|
||||
("\u{b7}", ""), // middle dot
|
||||
("\u{2022}", ""), // bullet
|
||||
];
|
||||
|
||||
map.extend(remove_replacements.iter()
|
||||
.map(|(k, v)| (k.to_string(), v.to_string())));
|
||||
|
||||
map
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user