Package helma.util

Class MarkdownProcessor

java.lang.Object
helma.util.MarkdownProcessor

public class MarkdownProcessor extends Object
  • Constructor Details

    • MarkdownProcessor

      public MarkdownProcessor()
    • MarkdownProcessor

      public MarkdownProcessor(String text)
    • MarkdownProcessor

      public MarkdownProcessor(File file) throws IOException
      Throws:
      IOException
  • Method Details

    • process

      public String process(String text)
    • process

      public String process()
    • processLinkText

      public String processLinkText(String text)
    • getLink

      protected String[] getLink(String linkId)
      Retrieve a link defined in the source text. If the link is not found, we call lookupLink(String) to retrieve it from an external source.
      Parameters:
      linkId - the link id
      Returns:
      a String array with the url as first element and the link title as second.
    • lookupLink

      protected String[] lookupLink(String linkId)
      Method to override for extended link lookup, e.g. for integration into a wiki
      Parameters:
      linkId - the link id
      Returns:
      a String array with the url as first element and the link title as second.
    • openTag

      protected void openTag(String tag, StringBuilder builder)
      Method to override to create custom HTML tags.
      Parameters:
      tag - the html tag to generate
      builder - the java.lang.StringBuilder to generate the string
    • main

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