Skip to content

Commit

Permalink
Add anchors for markdown (#1442)
Browse files Browse the repository at this point in the history
  • Loading branch information
BarkingBad committed Oct 5, 2020
1 parent 49d4757 commit 0235c0e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/gfm/src/main/kotlin/GfmPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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("#+ "),
Expand Down Expand Up @@ -366,4 +367,4 @@ class MarkdownLocationProviderFactory(val context: DokkaContext) : LocationProvi
class MarkdownLocationProvider(
pageGraphRoot: RootPageNode,
dokkaContext: DokkaContext
) : DokkaLocationProvider(pageGraphRoot, dokkaContext, ".md")
) : DokkaLocationProvider(pageGraphRoot, dokkaContext, ".md")

0 comments on commit 0235c0e

Please sign in to comment.