From c91b293c9df4c014b049ca8cbdf921f02d27537a Mon Sep 17 00:00:00 2001 From: Melroy van den Berg Date: Mon, 15 Mar 2021 11:27:54 +0100 Subject: fix(cmake): Change cmake symbol to unicode triangle (#2456) --- docs/config/README.md | 2 +- src/configs/cmake.rs | 2 +- src/modules/cmake.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/config/README.md b/docs/config/README.md index af580016a..48b634254 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -458,7 +458,7 @@ the module will be activated if any of the following conditions are met: | Option | Default | Description | | ------------------- | -------------------------------------- | -------------------------------------------- | | `format` | `"via [$symbol($version )]($style)"` | The format for the module. | -| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `symbol` | `"△ "` | The symbol used before the version of cmake. | | `detect_extensions` | `[]` | Which extensions should trigger this moudle | | `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module | | `detect_folders` | `[]` | Which folders should trigger this module | diff --git a/src/configs/cmake.rs b/src/configs/cmake.rs index 1fc934f4a..012d8ebda 100644 --- a/src/configs/cmake.rs +++ b/src/configs/cmake.rs @@ -17,7 +17,7 @@ impl<'a> RootModuleConfig<'a> for CMakeConfig<'a> { fn new() -> Self { CMakeConfig { format: "via [$symbol($version )]($style)", - symbol: "喝 ", + symbol: "△ ", style: "bold blue", disabled: false, detect_extensions: vec![], diff --git a/src/modules/cmake.rs b/src/modules/cmake.rs index 2d003a977..01d4010e9 100644 --- a/src/modules/cmake.rs +++ b/src/modules/cmake.rs @@ -77,7 +77,7 @@ mod tests { let dir = tempfile::tempdir()?; File::create(dir.path().join("CMakeLists.txt"))?.sync_all()?; let actual = ModuleRenderer::new("cmake").path(dir.path()).collect(); - let expected = Some(format!("via {}", Color::Blue.bold().paint("喝 v3.17.3 "))); + let expected = Some(format!("via {}", Color::Blue.bold().paint("△ v3.17.3 "))); assert_eq!(expected, actual); dir.close() } @@ -87,7 +87,7 @@ mod tests { let dir = tempfile::tempdir()?; File::create(dir.path().join("CMakeCache.txt"))?.sync_all()?; let actual = ModuleRenderer::new("cmake").path(dir.path()).collect(); - let expected = Some(format!("via {}", Color::Blue.bold().paint("喝 v3.17.3 "))); + let expected = Some(format!("via {}", Color::Blue.bold().paint("△ v3.17.3 "))); assert_eq!(expected, actual); dir.close() } -- cgit v1.2.3