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 }