diff --git a/output/src/main/scala-3/fix/OldPackageObject.scala b/output/src/main/scala-3/fix/OldPackageObject.scala index f7e777d..22b823c 100644 --- a/output/src/main/scala-3/fix/OldPackageObject.scala +++ b/output/src/main/scala-3/fix/OldPackageObject.scala @@ -3,7 +3,7 @@ package fix // format: off package foo { def zzz: String = ??? -} -private object fooImpl extends doobie.Aliases -export fooImpl.* + private object fooImpl extends doobie.Aliases + export fooImpl.* +} diff --git a/rules/src/main/scala/fix/PackageObjectExport.scala b/rules/src/main/scala/fix/PackageObjectExport.scala index c2410ff..d0276a7 100644 --- a/rules/src/main/scala/fix/PackageObjectExport.scala +++ b/rules/src/main/scala/fix/PackageObjectExport.scala @@ -33,10 +33,10 @@ class PackageObjectExport extends SemanticRule("PackageObjectExport") { val extendsObject = maybeExtends match { case Some((_, extendsTokens)) => val privatePackage = - s"""|private object ${newTerm} ${extendsTokens.syntax.trim} - |export ${newTerm}.* + s"""| private object ${newTerm} ${extendsTokens.syntax.trim} + | export ${newTerm}.* |""".stripMargin - Patch.addRight(restTokens.last, "\n\n" + privatePackage) + Patch.addLeft(restTokens.last, "\n" + privatePackage) case None => Patch.empty } val packagePatch =