about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorSeiichi Uchida <seuchida@gmail.com>2018-12-25 18:00:45 +0900
committerGitHub <noreply@github.com>2018-12-25 18:00:45 +0900
commit84702bc2896cd9ef6152163d2ae75e1390ce0779 (patch)
tree31a71c61b75c21cf85d3ab06d8aef3d8b4df3d5f /src
parente60f4bbea6f71c31332b3b776db30153eb0a0742 (diff)
parente37f468b218f11096173538774c77c483006efdd (diff)
Merge pull request #3266 from wada314/fix-2973
Fix issue #3265
Diffstat (limited to 'src')
-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))
     }
 }