Skip to content

Commit

Permalink
Scalameta: upgrade to v4.12.6
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Jan 15, 2025
1 parent c366f34 commit ca1cdf1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._

object Dependencies {
val metaconfigV = "0.14.0"
val scalametaV = "4.12.4.1"
val scalametaV = "4.12.6"
val scalacheckV = "1.18.1"
val coursier = "2.1.10"
val munitV = "1.0.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,21 @@ class FormatWriter(formatOps: FormatOps) {
word.length == 2 && word(1) == '.' && "1aiI".contains(word(0))

val wf = new WordFormatter(appendBreak, termIndent, likeNonText)
val words = text.parts.iterator.map(_.syntax)
val wordIter = text.parts.iterator.buffered
val words = wordIter.map { info =>
val text = info.part.syntax
wordIter.headOption match {
case Some(next) if next.attachedToPrevious =>
val partsb = new StringBuilder()
partsb.append(text)
while ({ // poor man's do-while
partsb.append(wordIter.next().part.syntax)
wordIter.headOption.exists(_.attachedToPrevious)
}) {}
partsb.result()
case _ => text
}
}
val lineLength = math.max(lineLengthSoFar, termIndent.length)
wf(words, lineLength, lineLengthSoFar == 0, false)
appendBreak()
Expand Down
6 changes: 3 additions & 3 deletions scalafmt-tests/shared/src/test/resources/test/JavaDoc.stat
Original file line number Diff line number Diff line change
Expand Up @@ -3565,16 +3565,16 @@ object a
/**
* Options:
* - foo`bar`s
* - foo `bar` s
* - foo `bar` 's
* - foo `bar`s
* - foo `bar`'s
* - foo(`bar`)
* - foo (`bar`)
* - foo[[bar]]baz
* - foo [[bar]]s
* - foo([[bar]])
* - foo ([[bar]])
* - foo{{{bar}}}baz
* - foo {{{bar}}} s
* - foo {{{bar}}}s
* - foo({{{bar}}})
* - foo ({{{bar}}})
*/
Expand Down

0 comments on commit ca1cdf1

Please sign in to comment.