We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 973eafb commit a6c0bc1Copy full SHA for a6c0bc1
stringdiff/src/main/scala/app/tulz/diff/util/DiffTokenize.scala
@@ -266,10 +266,9 @@ private[diff] object DiffTokenize {
266
Nil -> Nil
267
}
268
269
- private val whitespace = "\\s+".r
270
private object Whitespace {
271
def unapply(s: IndexedSeq[String]): Option[IndexedSeq[String]] = {
272
- Some(s).filter(_.forall(whitespace.findFirstMatchIn(_).isDefined))
+ if (s.forall(_.forall(_.isWhitespace))) Some(s) else None
273
274
275
0 commit comments