• Stars
    star
    102
  • Rank 335,584 (Top 7 %)
  • Language
    Scala
  • License
    BSD 3-Clause "New...
  • Created over 15 years ago
  • Updated almost 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Markdown parser + object model in scala

Knockoff - Markdown in Scala

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

import com.tristanhunt.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" )

More information

See the home page for more information: http://tristanjuricek.com/knockoff.

License is BSD. Patches are welcome, if the patch is clean, I'll probably accept it.