diff options
author | michelou <michelou@epfl.ch> | 2006-11-28 12:45:25 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2006-11-28 12:45:25 +0000 |
commit | 686571753a22bfac40e9897b80d334b38daefc91 (patch) | |
tree | a33b083520eac0695b6960259f9469b3187fb71f /src | |
parent | 0774603396104aeb47ac34f920372b8f008e26de (diff) | |
download | scala-686571753a22bfac40e9897b80d334b38daefc91.tar.gz scala-686571753a22bfac40e9897b80d334b38daefc91.tar.bz2 scala-686571753a22bfac40e9897b80d334b38daefc91.zip |
fixed url encoding for internal links to method...
fixed url encoding for internal links to method signatures
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/doc/DocGenerator.scala | 7 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/doc/DocUtil.scala | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/DocGenerator.scala b/src/compiler/scala/tools/nsc/doc/DocGenerator.scala index fd6ec781b9..c1d02b7ab5 100644 --- a/src/compiler/scala/tools/nsc/doc/DocGenerator.scala +++ b/src/compiler/scala/tools/nsc/doc/DocGenerator.scala @@ -1,5 +1,5 @@ /* NSC -- new Scala compiler - * Copyright 2005-2006 LAMP/EPFL + * Copyright 2005-2007 LAMP/EPFL * @author Sean McDirmid */ // $Id$ @@ -7,6 +7,7 @@ package scala.tools.nsc.doc import java.io.{File, FileOutputStream, FileWriter} +import java.net.URLEncoder import java.util.StringTokenizer import java.util.regex.Pattern @@ -168,7 +169,7 @@ abstract class DocGenerator extends Models { def scalaName(pt: Type): String = pt.toString.replaceAll(" ", "") paramTypes.map(pt => scalaName(pt)).mkString("(", ",", ")") } - /*Utility.escape*/(sym.nameString + + URLEncoder.encode(sym.nameString + (sym.tpe match { case MethodType(paramTypes, _) => if (sym hasFlag Flags.JAVA) javaParams(paramTypes) @@ -177,7 +178,7 @@ abstract class DocGenerator extends Models { if (sym hasFlag Flags.JAVA) javaParams(paramTypes) else scalaParams(paramTypes) case _ => "" - })) + }), encoding) } def urlFor(sym: Symbol): String = sym match { diff --git a/src/compiler/scala/tools/nsc/doc/DocUtil.scala b/src/compiler/scala/tools/nsc/doc/DocUtil.scala index 92373c37fd..a2af6998ad 100644 --- a/src/compiler/scala/tools/nsc/doc/DocUtil.scala +++ b/src/compiler/scala/tools/nsc/doc/DocUtil.scala @@ -1,5 +1,5 @@ /* NSC -- new Scala compiler - * Copyright 2005-2006 LAMP/EPFL + * Copyright 2005-2007 LAMP/EPFL * @author Sean McDirmid */ // $Id$ @@ -48,9 +48,10 @@ object DocUtil { <a href={(relative + href)}>{t0}</a>; } + val encoding = "iso-8859-1" val header = - <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/> - <meta name="generator" content="scaladoc (2.1.9)"/> + <meta http-equiv="content-type" content={"text/html; " + encoding}/> + <meta name="generator" content="scaladoc (2.3.0)"/> <link rel="stylesheet" type="text/css" href={ relative + "style.css" }/> <script type="text/javascript" src={relative + "script.js"}></script>; |