diff options
author | Andrzej Ratajczak <32793002+BarkingBad@users.noreply.github.com> | 2020-10-05 11:31:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-05 11:31:54 +0200 |
commit | 0235c0ee12deaffed1d69ebaad86d24e5e48d9df (patch) | |
tree | 15d30591de0e1fa8f74fe6aa99d79378a52a3760 | |
parent | 49d4757acd8e6ef974baccbb228a76ceb74b59b0 (diff) | |
download | dokka-0235c0ee12deaffed1d69ebaad86d24e5e48d9df.tar.gz dokka-0235c0ee12deaffed1d69ebaad86d24e5e48d9df.tar.bz2 dokka-0235c0ee12deaffed1d69ebaad86d24e5e48d9df.zip |
Add anchors for markdown (#1442)
-rw-r--r-- | plugins/gfm/src/main/kotlin/GfmPlugin.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/gfm/src/main/kotlin/GfmPlugin.kt b/plugins/gfm/src/main/kotlin/GfmPlugin.kt index 0376b32e..780e4cb2 100644 --- a/plugins/gfm/src/main/kotlin/GfmPlugin.kt +++ b/plugins/gfm/src/main/kotlin/GfmPlugin.kt @@ -205,6 +205,7 @@ open class CommonmarkRenderer( val builder = StringBuilder() it.children.forEach { builder.append("| ") + builder.append("<a name=\"${it.dci.dri.first()}\"></a>") builder.append( buildString { it.build(this, pageContext) }.replace( Regex("#+ "), @@ -366,4 +367,4 @@ class MarkdownLocationProviderFactory(val context: DokkaContext) : LocationProvi class MarkdownLocationProvider( pageGraphRoot: RootPageNode, dokkaContext: DokkaContext -) : DokkaLocationProvider(pageGraphRoot, dokkaContext, ".md")
\ No newline at end of file +) : DokkaLocationProvider(pageGraphRoot, dokkaContext, ".md") |