diff options
author | Paul Phillips <paulp@improving.org> | 2011-08-25 20:58:19 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-08-25 20:58:19 +0000 |
commit | 2fdbabe0a26e652e05728c55f88d34beb0a9be98 (patch) | |
tree | a3a95b92f30f3811e9ad91c5f27500110127dd64 /src/compiler | |
parent | febf1a0cd942f2d222e1d1349eb9551ef36f4f48 (diff) | |
download | scala-2fdbabe0a26e652e05728c55f88d34beb0a9be98.tar.gz scala-2fdbabe0a26e652e05728c55f88d34beb0a9be98.tar.bz2 scala-2fdbabe0a26e652e05728c55f88d34beb0a9be98.zip |
Some kind of scaladoc quoting fix from the sbt ...
Some kind of scaladoc quoting fix from the sbt guy, no review.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala b/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala index b254cefe3f..a817ebddc8 100644 --- a/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala +++ b/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala @@ -199,12 +199,12 @@ class ModelFactory(val global: Global, val settings: doc.Settings) { val tplOwner = this.inTemplate.qualifiedName val tplName = this.name val patches = new Regex("""€\{(FILE_PATH|TPL_OWNER|TPL_NAME)\}""") - val patchedString = patches.replaceAllIn(settings.docsourceurl.value, { m => m.group(1) match { - case "FILE_PATH" => filePath - case "TPL_OWNER" => tplOwner - case "TPL_NAME" => tplName - } - }) + def substitute(name: String): String = name match { + case "FILE_PATH" => filePath + case "TPL_OWNER" => tplOwner + case "TPL_NAME" => tplName + } + val patchedString = patches.replaceAllIn(settings.docsourceurl.value, m => java.util.regex.Matcher.quoteReplacement(substitute(m.group(1))) ) new java.net.URL(patchedString) } else None |