foundweekends / knockoff   0.9.0

BSD 3-clause "New" or "Revised" License GitHub

A Markdown parser + object model in scala and scala.js

Scala versions: 2.10 2.11 2.12 2.13 3.x
Scala.js versions: 0.6 1.x
Scala Native versions: 0.4

Knockoff - Markdown in Scala

scaladoc Maven Central

This is a simple Markdown to object model to XHTML system.

import knockoff.DefaultDiscounter._

toXHTML(knockoff("""# My Markdown Content """))

You can use the blocks returned from the knockoff method to do useful things, like fetch the header:

val blocks = knockoff("""# My markdown""")
blocks.find( _.isInstanceOf[Header] ).map( toText ).getOrElse( "No header" )