🗝
summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authormia <mia@mia.jetzt>2024-04-07 05:13:19 -0700
committermia <mia@mia.jetzt>2024-04-07 05:13:31 -0700
commitf169357f4e7a7b6e25acd5e4bdffc91679162631 (patch)
treed273be9598dedcf12d963b7f819dc10be41d1929 /src
parentddcae106a51e29820a2ee2010fc9f88aaabd470c (diff)
downloadcgit-syntect-f169357f4e7a7b6e25acd5e4bdffc91679162631.tar.gz
cgit-syntect-f169357f4e7a7b6e25acd5e4bdffc91679162631.zip
minor tweak
Diffstat (limited to 'src')
-rw-r--r--src/main.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 22ea865..e353666 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -137,6 +137,7 @@ fn highlight() {
         .unwrap_or_else(|_| PathBuf::from("/usr/share/cgit-syntect/scopes"));
     let scopes = std::fs::read_to_string(scope_dump)
         .unwrap()
+        .trim()
         .lines()
         .map(ScopeSelectors::from_str)
         .map(|sels| sels.unwrap())
@@ -217,7 +218,6 @@ fn highlight() {
         stdout.flush().unwrap();
         line.clear();
         if std::io::stdin().read_line(&mut line).unwrap() == 0 {
-            write!(&mut stdout, "\n").unwrap();
             break;
         }
         if !line.ends_with('\n') {