aboutsummaryrefslogtreecommitdiff
path: root/plugins/gfm/src
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2020-07-23 12:38:59 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-08-19 13:34:10 +0200
commitfc38ceda06d92978175d37bb7197763539c966a2 (patch)
tree69751ac7fd6083fabce8a65bae8e84f85ece5358 /plugins/gfm/src
parenta3880835c4e6c6d0570ab2193be50bd739e9f2ca (diff)
downloaddokka-fc38ceda06d92978175d37bb7197763539c966a2.tar.gz
dokka-fc38ceda06d92978175d37bb7197763539c966a2.tar.bz2
dokka-fc38ceda06d92978175d37bb7197763539c966a2.zip
Make unresolved links render as text
Diffstat (limited to 'plugins/gfm/src')
-rw-r--r--plugins/gfm/src/main/kotlin/GfmPlugin.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/gfm/src/main/kotlin/GfmPlugin.kt b/plugins/gfm/src/main/kotlin/GfmPlugin.kt
index b565deb5..3cec8320 100644
--- a/plugins/gfm/src/main/kotlin/GfmPlugin.kt
+++ b/plugins/gfm/src/main/kotlin/GfmPlugin.kt
@@ -318,12 +318,12 @@ open class CommonmarkRenderer(
get() = this !is RendererSpecificPage || strategy != RenderingStrategy.DoNothing
private fun StringBuilder.buildLink(to: PageNode, from: PageNode) =
- buildLink(locationProvider.resolve(to, from)) {
+ buildLink(locationProvider.resolve(to, from)!!) {
append(to.name)
}
override suspend fun renderPage(page: PageNode) {
- val path by lazy { locationProvider.resolve(page, skipExtension = true) }
+ val path by lazy { locationProvider.resolve(page, skipExtension = true)!! }
when (page) {
is ContentPage -> outputWriter.write(path, buildPage(page) { c, p -> buildPageContent(c, p) }, ".md")
is RendererSpecificPage -> when (val strategy = page.strategy) {