diff --git a/rules/src/main/scala/fix/FlatMapCollect.scala b/rules/src/main/scala/fix/FlatMapCollect.scala index 251c2a7..728994f 100644 --- a/rules/src/main/scala/fix/FlatMapCollect.scala +++ b/rules/src/main/scala/fix/FlatMapCollect.scala @@ -44,7 +44,7 @@ class FlatMapCollect extends SyntacticRule("FlatMapCollect") { Patch.replaceTree(flatMap, "collect"), Patch.removeTokens(noneCase.tokens), pf.tokens.reverseIterator - .find(t => t.is[Token.LF] && t.pos.start < noneCase.pos.start) + .find(t => (t.is[Token.CR] || t.is[Token.LF]) && t.pos.start < noneCase.pos.start) .map { t => Seq( Patch.removeToken(t),