Class MarkdownParser

All Implemented Interfaces:
MacroExecutor, Markup, TextMarkup, Parser

@Singleton @Named("markdown") public class MarkdownParser extends AbstractTextParser implements TextMarkup

Implementation of Parser for Markdown documents.

Defers effective parsing to the flexmark-java library, which generates HTML content then delegates parsing of this content to a slightly modified Doxia Xhtml5 parser. (before 1.8, the PegDown library was used)

Since:
1.3
Author:
Vladimir Schneider, Julien Nicoulaud
  • Constructor Details

  • Method Details

    • parse

      public void parse(Reader source, Sink sink, String reference) throws ParseException
      Description copied from interface: Parser
      Parses the given source model and emits Doxia events into the given sink.
      Specified by:
      parse in interface Parser
      Parameters:
      source - not null reader that provides the source document.
      sink - A sink that consumes the Doxia events.
      reference - a string identifying the source (for file based documents the source file path)
      Throws:
      ParseException - if the model could not be parsed.