diff options
Diffstat (limited to '')
-rw-r--r-- | src/new/mod.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/new/mod.rs b/src/new/mod.rs index 0c4114c..fed4ff3 100644 --- a/src/new/mod.rs +++ b/src/new/mod.rs @@ -12,13 +12,18 @@ pub struct MangledName(String); impl MangledName { pub fn new(name: &str) -> Self { - let safe_name = name + let new_name = deunicode(&name.to_case(Case::Snake)); + + let safe_name = new_name // TeX fails to include/input stuff with a colon in it. .replace(':', "_") // This obviously creates weird extra directories - .replace('/', "_"); + .replace('/', "_") + // These are just difficult to use on the command line + .replace('"', "_") + .replace('\'', "_"); - let ascii_name = deunicode(&safe_name.to_case(Case::Snake)).to_case(Case::Snake); + let ascii_name = safe_name.to_case(Case::Snake); Self(ascii_name) } |