fixed bad source links in generated kdoc

This commit is contained in:
James Strachan
2012-06-14 09:37:31 +01:00
parent bdae2021b5
commit 5b85e861b7
2 changed files with 5 additions and 0 deletions
@@ -327,6 +327,7 @@ class KModel(var context: BindingContext, val config: KDocConfig) {
// lets remove the root project directory
val rootDir = projectRootDir()
val canonicalFile = File(filePath).getCanonicalPath() ?: ""
//println("=========== root dir for filePath: $canonicalFile is $rootDir")
val relativeFile = if (rootDir != null && canonicalFile.startsWith(rootDir))
canonicalFile.substring(rootDir.length()) else canonicalFile
if (relativeFile != null) {