fixed function links and use correct package format
This commit is contained in:
@@ -54,12 +54,13 @@ abstract class KDocTemplate() : TextTemplate() {
|
||||
}
|
||||
|
||||
open fun sourceHref(f: KFunction): String {
|
||||
return if (f.owner is KClass) {
|
||||
"${rootHref(f.owner.pkg)}src-html/${f.owner.simpleName}.html#line.${f.sourceLine}"
|
||||
} else {
|
||||
val owner = f.owner
|
||||
return if (owner is KClass) {
|
||||
"${rootHref(owner.pkg)}src-html/${owner.simpleName}.html#line.${f.sourceLine}"
|
||||
} else if (owner is KPackage) {
|
||||
// TODO how to find the function in a package???
|
||||
""
|
||||
}
|
||||
"${rootHref(owner)}src-html/namespace.html#line.${f.sourceLine}"
|
||||
} else href(f)
|
||||
}
|
||||
|
||||
open fun link(c: KClass, fullName: Boolean = false): String {
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ ${model.title}
|
||||
</TR>""")
|
||||
for (p in model.packages) {
|
||||
println("""<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD WIDTH="20%"><B><A HREF="${p.nameAsPath}/package-summary.html">${p.nameAsPath}</A></B></TD>
|
||||
<TD WIDTH="20%"><B><A HREF="${p.nameAsPath}/package-summary.html">${p.name}</A></B></TD>
|
||||
<TD>${p.description}</TD>
|
||||
</TR>""")
|
||||
}
|
||||
|
||||
+1
-1
@@ -91,7 +91,7 @@ abstract class PackageTemplateSupport(open val pkg: KPackage) : KDocTemplate() {
|
||||
}
|
||||
|
||||
fun printFunctionDetail(function: KFunction): Unit {
|
||||
println("""<A NAME="${function.name}{${function.parameterTypeText}})"><!-- --></A><A NAME="${function.name}(${function.typeParametersText})"><!-- --></A><H3>""")
|
||||
println("""<A NAME="${function.name}{${function.parameterTypeText}}"><!-- --></A><A NAME="${function.link}"><!-- --></A><H3>""")
|
||||
println("""${function.name}</H3>""")
|
||||
println("""<PRE>""")
|
||||
println("""<FONT SIZE="-1">""")
|
||||
|
||||
Reference in New Issue
Block a user