Skip to content

Commit 07e4ae2

Browse files
committed
Replace "$plus" with "+" in webview
1 parent 8e39b71 commit 07e4ae2

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

dottydoc/jvm/src/dotty/tools/dottydoc/html/EntityPage.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,9 @@ case class EntityPage(entity: Entity, packages: Map[String, Package]) {
7575
)
7676
)
7777

78-
private def filteredName(str: String) =
79-
str.replaceAll("\\$colon", ":")
78+
private def filteredName(str: String) = str
79+
.replaceAll("\\$colon", ":")
80+
.replaceAll("\\$plus", "+")
8081

8182
private def relativePath(to: Entity) =
8283
util.traversing.relativePath(entity, to)

dottydoc/jvm/test/WhitelistedStdLib.scala

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,19 @@ class TestWhitelistedCollections extends DottyTest {
1414

1515
assert(array.comment.get.body.length > 0)
1616
}
17+
18+
@Test def traitImmutableHasDocumentation =
19+
checkFiles(WhitelistedStandardLib.files) { doc =>
20+
val imm = doc
21+
.packages("scala")
22+
.children.find(_.path.mkString(".") == "scala.Immutable")
23+
.get
24+
25+
assert(
26+
imm.kind == "trait" && imm.name == "Immutable",
27+
"Found wrong `Immutable`")
28+
assert(
29+
imm.comment.map(_.body).get.length > 0,
30+
"Imm did not have a comment with length > 0")
31+
}
1732
}

0 commit comments

Comments
 (0)