about summary refs log tree commit diff
path: root/src/comment.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/comment.rs')
-rw-r--r--src/comment.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/comment.rs b/src/comment.rs
index 7d7f56f54a5..492b03c045a 100644
--- a/src/comment.rs
+++ b/src/comment.rs
@@ -1321,6 +1321,11 @@ impl<'a> Iterator for LineClasses<'a> {
             }
         }
 
+        // Workaround for CRLF newline.
+        if line.ends_with('\r') {
+            line.pop();
+        }
+
         Some((self.kind, line))
     }
 }