Coverage Summary for Class: StrikethroughMarkdownNodeRenderer (io.heapy.kotmark.ext.gfm.strikethrough.internal)

Class Class, % Method, % Branch, % Line, % Instruction, %
StrikethroughMarkdownNodeRenderer 100% (1/1) 100% (3/3) 100% (2/2) 100% (11/11) 100% (38/38)


 package io.heapy.kotmark.ext.gfm.strikethrough.internal
 
 import io.heapy.kotmark.ext.gfm.strikethrough.Strikethrough
 import io.heapy.kotmark.node.Node
 import io.heapy.kotmark.renderer.markdown.MarkdownNodeRendererContext
 
 class StrikethroughMarkdownNodeRenderer(
     private val context: MarkdownNodeRendererContext,
 ) : StrikethroughNodeRenderer() {
     override fun render(node: Node) {
         val strikethrough = node as Strikethrough
         context.writer.raw(strikethrough.openingDelimiter)
         renderChildren(node)
         context.writer.raw(strikethrough.closingDelimiter)
     }
 
     private fun renderChildren(parent: Node) {
         var node = parent.firstChild
         while (node != null) {
             val next = node.next
             context.render(node)
             node = next
         }
     }
 }