Coverage Summary for Class: TypedNodeRendererKt (io.heapy.kotmark.renderer.kotlinxhtml)

Class Method, % Branch, % Line, % Instruction, %
TypedNodeRendererKt 100% (1/1) 100% (1/1) 100% (8/8)
TypedNodeRendererKt$nodeRenderer$1 100% (1/1) 100% (1/1) 100% (2/2)
TypedNodeRendererKt$nodeRenderer$1$create$$inlined$typedNodeRenderer$1 0% (0/2)
Total 50% (2/4) 100% (2/2) 100% (10/10)


 package io.heapy.kotmark.renderer.kotlinxhtml
 
 import io.heapy.kotmark.node.Node
 import io.heapy.kotmark.renderer.typedNodeRenderer
 
 /**
  * Registers a handler for exactly [N]; the first registration for a node type wins.
  * The receiver belongs to the current render. Captured mutable state in [block] is shared;
  * use [KotlinxHtmlRenderer.Configuration.nodeRendererFactory] for state local to each render
  * or for lifecycle hooks. Custom handlers remain responsible for URL processing.
  */
 inline fun <reified N : Node> KotlinxHtmlRenderer.Configuration.nodeRenderer(
     crossinline block: KotlinxHtmlNodeRendererContext.(N) -> Unit,
 ) {
     nodeRendererFactory { context ->
         typedNodeRenderer<N> { node -> block(context, node) }
     }
 }