diff options
Diffstat (limited to 'src/scaladoc')
-rw-r--r-- | src/scaladoc/scala/tools/nsc/doc/ScaladocAnalyzer.scala | 9 | ||||
-rw-r--r-- | src/scaladoc/scala/tools/nsc/doc/Settings.scala | 2 | ||||
-rw-r--r-- | src/scaladoc/scala/tools/nsc/doc/model/MemberLookup.scala | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/src/scaladoc/scala/tools/nsc/doc/ScaladocAnalyzer.scala b/src/scaladoc/scala/tools/nsc/doc/ScaladocAnalyzer.scala index 10c382e169..cbf8ff22ba 100644 --- a/src/scaladoc/scala/tools/nsc/doc/ScaladocAnalyzer.scala +++ b/src/scaladoc/scala/tools/nsc/doc/ScaladocAnalyzer.scala @@ -190,7 +190,7 @@ abstract class ScaladocSyntaxAnalyzer[G <: Global](val global: G) extends Syntax typeParams.nonEmpty || version.nonEmpty || since.nonEmpty } def isDirty = unclean(unmooredParser parseComment doc) - if ((doc ne null) && (settings.lint || isDirty)) + if ((doc ne null) && (settings.warnDocDetached || isDirty)) reporter.warning(doc.pos, "discarding unmoored doc comment") } @@ -208,7 +208,7 @@ abstract class ScaladocSyntaxAnalyzer[G <: Global](val global: G) extends Syntax super.skipDocComment() } override def skipBlockComment(): Unit = { - inDocComment = false + inDocComment = false // ??? this means docBuffer won't receive contents of this comment??? docBuffer = new StringBuilder("/*") super.skipBlockComment() } @@ -217,9 +217,10 @@ abstract class ScaladocSyntaxAnalyzer[G <: Global](val global: G) extends Syntax def foundStarComment(start: Int, end: Int) = try { val str = docBuffer.toString val pos = Position.range(unit.source, start, start, end) - unit.comment(pos, str) - if (inDocComment) + if (inDocComment) { + signalParsedDocComment(str, pos) lastDoc = DocComment(str, pos) + } true } finally { docBuffer = null diff --git a/src/scaladoc/scala/tools/nsc/doc/Settings.scala b/src/scaladoc/scala/tools/nsc/doc/Settings.scala index 02929c5ecb..44683f1755 100644 --- a/src/scaladoc/scala/tools/nsc/doc/Settings.scala +++ b/src/scaladoc/scala/tools/nsc/doc/Settings.scala @@ -249,7 +249,7 @@ class Settings(error: String => Unit, val printMsg: String => Unit = println(_)) val idx = s.indexOf("#") if (idx > 0) { val (first, last) = s.splitAt(idx) - Some(new File(first).getAbsolutePath -> appendIndex(last.substring(1))) + Some(new File(first).getCanonicalPath -> appendIndex(last.substring(1))) } else { error(s"Illegal -doc-external-doc option; expected a pair with '#' separator, found: '$s'") None diff --git a/src/scaladoc/scala/tools/nsc/doc/model/MemberLookup.scala b/src/scaladoc/scala/tools/nsc/doc/model/MemberLookup.scala index 339129bdbc..64eb1adbea 100644 --- a/src/scaladoc/scala/tools/nsc/doc/model/MemberLookup.scala +++ b/src/scaladoc/scala/tools/nsc/doc/model/MemberLookup.scala @@ -45,7 +45,7 @@ trait MemberLookup extends base.MemberLookupBase { sym.info.member(newTermName("package")) else sym Option(sym1.associatedFile) flatMap (_.underlyingSource) flatMap { src => - val path = src.path + val path = src.canonicalPath settings.extUrlMapping get path map { url => LinkToExternal(name, url + "#" + name) } |