diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 64a6771972..de6b51d09f 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -8,7 +8,7 @@ import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._ object Dependencies { val metaconfigV = "0.13.0" - val scalametaV = "4.10.1" + val scalametaV = "4.10.2" val scalacheckV = "1.18.1" val coursier = "2.1.10" val munitV = "1.0.2" diff --git a/scalafmt-core/shared/src/main/scala/org/scalafmt/internal/FormatWriter.scala b/scalafmt-core/shared/src/main/scala/org/scalafmt/internal/FormatWriter.scala index bfe47706ba..643a6a7d31 100644 --- a/scalafmt-core/shared/src/main/scala/org/scalafmt/internal/FormatWriter.scala +++ b/scalafmt-core/shared/src/main/scala/org/scalafmt/internal/FormatWriter.scala @@ -1034,18 +1034,10 @@ class FormatWriter(formatOps: FormatOps) { private def formatListBlock( listIndent: String, - )(block: Scaladoc.ListBlock): Unit = { - val prefix = block.prefix + )(block: Scaladoc.ListBlock): Unit = block.items.foreach { item => + val prefix = item.prefix val itemIndent = getIndentation(listIndent.length + prefix.length + 1) - block.items.foreach { x => - sb.append(listIndent).append(prefix).append(' ') - formatListTerm(itemIndent)(x) - } - } - - private def formatListTerm( - itemIndent: String, - )(item: Scaladoc.ListItem): Unit = { + sb.append(listIndent).append(prefix).append(' ') formatTextAfterMargin(item.text, itemIndent) item.terms.foreach(formatTerm(_, itemIndent, sbNonEmpty = true)) }