aboutsummaryrefslogtreecommitdiff
path: root/dottydoc
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-05-05 15:36:12 +0200
committerFelix Mulder <felix.mulder@gmail.com>2016-08-19 15:37:23 +0200
commit07e4ae210b34e64a84731133f6ea4761baa19057 (patch)
tree0f254d28d304402486d72712a5060c6481596857 /dottydoc
parent8e39b71b29afd7951745dbaf957eade0e9f51434 (diff)
downloaddotty-07e4ae210b34e64a84731133f6ea4761baa19057.tar.gz
dotty-07e4ae210b34e64a84731133f6ea4761baa19057.tar.bz2
dotty-07e4ae210b34e64a84731133f6ea4761baa19057.zip
Replace "$plus" with "+" in webview
Diffstat (limited to 'dottydoc')
-rw-r--r--dottydoc/jvm/src/dotty/tools/dottydoc/html/EntityPage.scala5
-rw-r--r--dottydoc/jvm/test/WhitelistedStdLib.scala15
2 files changed, 18 insertions, 2 deletions
diff --git a/dottydoc/jvm/src/dotty/tools/dottydoc/html/EntityPage.scala b/dottydoc/jvm/src/dotty/tools/dottydoc/html/EntityPage.scala
index b3f5b5d53..8bbc73db8 100644
--- a/dottydoc/jvm/src/dotty/tools/dottydoc/html/EntityPage.scala
+++ b/dottydoc/jvm/src/dotty/tools/dottydoc/html/EntityPage.scala
@@ -75,8 +75,9 @@ case class EntityPage(entity: Entity, packages: Map[String, Package]) {
)
)
- private def filteredName(str: String) =
- str.replaceAll("\\$colon", ":")
+ private def filteredName(str: String) = str
+ .replaceAll("\\$colon", ":")
+ .replaceAll("\\$plus", "+")
private def relativePath(to: Entity) =
util.traversing.relativePath(entity, to)
diff --git a/dottydoc/jvm/test/WhitelistedStdLib.scala b/dottydoc/jvm/test/WhitelistedStdLib.scala
index bbf0b4c6b..88dc67e99 100644
--- a/dottydoc/jvm/test/WhitelistedStdLib.scala
+++ b/dottydoc/jvm/test/WhitelistedStdLib.scala
@@ -14,4 +14,19 @@ class TestWhitelistedCollections extends DottyTest {
assert(array.comment.get.body.length > 0)
}
+
+ @Test def traitImmutableHasDocumentation =
+ checkFiles(WhitelistedStandardLib.files) { doc =>
+ val imm = doc
+ .packages("scala")
+ .children.find(_.path.mkString(".") == "scala.Immutable")
+ .get
+
+ assert(
+ imm.kind == "trait" && imm.name == "Immutable",
+ "Found wrong `Immutable`")
+ assert(
+ imm.comment.map(_.body).get.length > 0,
+ "Imm did not have a comment with length > 0")
+ }
}