SAX handler acting as output filter and forwarder for markdown-generated SAX event streams.

To be put after Linkhandler and before Outputhandler stage in a processing chain.

This handler acts as a filter based on properties supplied to the configure() method:

  • for pruning markdown: vocabulary attributes

  • (if prune_singleton_html_paras_in_listitems) for pruning single <p>'s occuring in <li>'s or <dd>'s as the sole child so that text content of such <p>'s gets text content of the parent <li> directly, suppressing <p>; however, if it was specified on the element (via a markdown:-attribute) that pruning shouldn't be performed on the respective <p>, then it doesn't get suppressed

  • (if keep_trailing_codeblock_newlines) for removing the newline character ending a code text block originating from markdown.

Implements DocumentHandler, LexicalHandler, DTDHandler.

Constructor

new MarkdownOutputFilter(errorhandler, nexthandler)

Parameters

Name Type Description
errorhandler Errorhandler
nexthandler DocumentHandler

Name Description
configure Configuration method.
reset Resets internal state.

Member Details

configure(args)

Configuration method.

Parameters

Name Type Description
args Object.<string, string>

map of configuration properties

reset()

Resets internal state.