Skip to content

Commit

Permalink
Update scalameta and allow for escaping quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
tgodzik committed Sep 9, 2020
1 parent 89341cb commit 9a10ccb
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
5 changes: 2 additions & 3 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ assumeStandardLibraryStripMargin = true
project.excludeFilters = [
"mdoc/src/main/scala-3"
"runtime/src/main/scala-3"
"printing/src/main/scala-3"
"printing/src/main/scala-0.26"
"printing/src/main/scala-0.27"
"runtime/src/main/scala-0.26"
"runtime/src/main/scala-0.27"
]
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ lazy val sharedSettings = List(
)

val V = new {
val scalameta = "4.3.20"
val scalameta = "4.3.22"
val munit = "0.7.12"
val coursier = "0.0.25"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ trait DocumentBuilder {
case MdocNonFatal(e) =>
CrashResult.Crashed(e, pos)
}
// We can't generate macros in the same unit and the name or result will be "result" anyway
// We can't generate macros in the same unit and the name of result will be "result" anyway
myBinders.append(new Binder(result, "result", tprint, pos))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,21 @@ class WorksheetSuite extends BaseSuite {
|""".stripMargin
)

checkDecorations(
"dotty-interpolation".tag(OnlyScala3),
"""|val name = "Ben"
|val quoted = s"$"$name$""
|quoted
|""".stripMargin,
"""|<val name = "Ben"> // : String = Ben
|name: String = Ben
|<val quoted = s"$"$name$""> // : String = "Ben"
|quoted: String = "Ben"
|<quoted> // : String = "Ben"
|res0: String = "Ben"
|""".stripMargin
)

checkDecorations(
"dotty-imports".tag(OnlyScala3),
"""|import $dep.`com.lihaoyi:scalatags_2.13:0.9.1`
Expand Down

0 comments on commit 9a10ccb

Please sign in to comment.