pamflet.FencePlugin
See theFencePlugin companion object
trait FencePlugin extends PartialFunction[(Option[String], String, Position, ListBuffer[Block]), Block]
A FencePlugin must implement the following methods:
- def isDefinedAt(language: Option[String]): Boolean
- def toBlock(language: Option[String], content: String, position: Position, list: ListBuffer[Block]): Block
- def blockToXHTML: PartialFunction[Block, xml.Node]
First, you have to declare what "language" your FencePlugin supports with isDefinedAt
.
Next, in toBlock
evaluate the incoming content and store them in a custom case class that extends Block
.
Finally, in blockToXHTML
turn your custom case class into an xml Node
.
Attributes
- Companion:
- object
- Graph
- Supertypes
- trait PartialFunction[(Option[String], String, Position, ListBuffer[Block]), Block]trait ((Option[String], String, Position, ListBuffer[Block])) => Blockclass Objecttrait Matchableclass Any