diff --git a/markdown/core/src/main/kotlin/org/jetbrains/jewel/markdown/rendering/DefaultInlineMarkdownRenderer.kt b/markdown/core/src/main/kotlin/org/jetbrains/jewel/markdown/rendering/DefaultInlineMarkdownRenderer.kt index e93af136e..26dfc56e5 100644 --- a/markdown/core/src/main/kotlin/org/jetbrains/jewel/markdown/rendering/DefaultInlineMarkdownRenderer.kt +++ b/markdown/core/src/main/kotlin/org/jetbrains/jewel/markdown/rendering/DefaultInlineMarkdownRenderer.kt @@ -63,17 +63,15 @@ public open class DefaultInlineMarkdownRenderer( is InlineMarkdown.Link -> { withStyles(styling.link.withEnabled(enabled), child) { - val destination = it.nativeNode.destination - val link = - LinkAnnotation.Clickable( - tag = destination, - linkInteractionListener = { _ -> - if (enabled) { - onUrlClicked?.invoke(destination) - } - }, - ) - pushLink(link) + if (enabled) { + val destination = it.nativeNode.destination + val link = + LinkAnnotation.Clickable( + tag = destination, + linkInteractionListener = { _ -> onUrlClicked?.invoke(destination) }, + ) + pushLink(link) + } appendInlineMarkdownFrom(it.children, styling, enabled) } }