Class MarkdownParser

java.lang.Object
com.teamten.markdown.MarkdownParser

public class MarkdownParser extends Object
Parses a Markdown file into a DOM.
  • Constructor Details

    • MarkdownParser

      public MarkdownParser()
  • Method Details

    • main

      public static void main(String[] args) throws IOException
      Throws:
      IOException
    • setForceBody

      public void setForceBody(boolean forceBody)
      Whether to force the parse as a body block. Setting this to true causes characters like # to be treated like any other. Defaults to false.
    • parse

      public Doc parse(InputStream inputStream) throws IOException
      Throws:
      IOException
    • parseSingleBlock

      public static Block parseSingleBlock(String text)
      Parse a single block from a string, returning the block. This does not support comments in the Markdown.
      Throws:
      IllegalArgumentException - if the text cannot be parsed to exactly one block.
    • parseDoc

      public static Doc parseDoc(String text)
      Parse a doc from a string. This does not support comments in the Markdown.