summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKato Kazuyoshi <kato.kazuyoshi@gmail.com>2011-06-12 05:18:31 +0000
committerKato Kazuyoshi <kato.kazuyoshi@gmail.com>2011-06-12 05:18:31 +0000
commit1a11aef9c3c3d79cda81bde450bfbb82da747bdb (patch)
treee92e40f9b3fb7f8aadaf1cda562492cbc6c3c34e
parenta4772525b2426b839ef78e05a60d7b0746d4413d (diff)
downloadscala-1a11aef9c3c3d79cda81bde450bfbb82da747bdb.tar.gz
scala-1a11aef9c3c3d79cda81bde450bfbb82da747bdb.tar.bz2
scala-1a11aef9c3c3d79cda81bde450bfbb82da747bdb.zip
The '#' sign may easily to lead to problems, So...
The '#' sign may easily to lead to problems, So we use '_' instead of '#'. Closes #4641.
-rwxr-xr-xsrc/compiler/scala/tools/nsc/doc/model/IndexModelFactory.scala2
-rw-r--r--test/scaladoc/resources/SI_4641.scala3
-rw-r--r--test/scaladoc/scala/html/HtmlFactoryTest.scala7
3 files changed, 11 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/model/IndexModelFactory.scala b/src/compiler/scala/tools/nsc/doc/model/IndexModelFactory.scala
index 3d3d3d7876..ef3c2beffb 100755
--- a/src/compiler/scala/tools/nsc/doc/model/IndexModelFactory.scala
+++ b/src/compiler/scala/tools/nsc/doc/model/IndexModelFactory.scala
@@ -25,7 +25,7 @@ object IndexModelFactory {
def addMember(d: MemberEntity) = {
val firstLetter = {
val ch = d.name.head.toLower
- if(ch.isLetterOrDigit) ch else '#'
+ if(ch.isLetterOrDigit) ch else '_'
}
val letter = this.get(firstLetter).getOrElse {
immutable.SortedMap[String, SortedSet[MemberEntity]]()
diff --git a/test/scaladoc/resources/SI_4641.scala b/test/scaladoc/resources/SI_4641.scala
new file mode 100644
index 0000000000..a5557a78d9
--- /dev/null
+++ b/test/scaladoc/resources/SI_4641.scala
@@ -0,0 +1,3 @@
+object Foo {
+ def ### = 123
+}
diff --git a/test/scaladoc/scala/html/HtmlFactoryTest.scala b/test/scaladoc/scala/html/HtmlFactoryTest.scala
index cb31df3fb2..c85429e353 100644
--- a/test/scaladoc/scala/html/HtmlFactoryTest.scala
+++ b/test/scaladoc/scala/html/HtmlFactoryTest.scala
@@ -306,4 +306,11 @@ object Test extends Properties("HtmlFactory") {
case _ => false
}
}
+
+ property("SI-4641") = {
+ createReferenceIndex("SI_4641.scala") match {
+ case Some(pages) => pages.contains("index/index-_.html")
+ case _ => false
+ }
+ }
}