From a0f56df441f4b19e689af4cd94f440a3490a520d Mon Sep 17 00:00:00 2001 From: Ondra Pelech Date: Mon, 18 Jan 2021 22:03:04 +0100 Subject: [PATCH] Handle Dotty versions like 0.27.0-RC1 --- mdoc-sbt/src/main/scala/mdoc/MdocPlugin.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mdoc-sbt/src/main/scala/mdoc/MdocPlugin.scala b/mdoc-sbt/src/main/scala/mdoc/MdocPlugin.scala index 9994482ef..ff98e263c 100644 --- a/mdoc-sbt/src/main/scala/mdoc/MdocPlugin.scala +++ b/mdoc-sbt/src/main/scala/mdoc/MdocPlugin.scala @@ -67,7 +67,7 @@ object MdocPlugin extends AutoPlugin { } def compatibleScalaVersion = Def.setting { - scalaVersion.value.split('.').take(3).map(_.toInt) match { + scalaVersion.value.takeWhile(_ != '-').split('.').take(3).map(_.toInt) match { case Array(2, 12, minor) if minor <= 12 => BuildInfo.scala212Legacy case _ => scalaBinaryVersion.value }