Class HighlighterService

java.lang.Object
org.ctan.markup.markdown.syntax.HighlighterService

public class HighlighterService extends Object
This class provides a singleton entry point for syntax highlighting.
  • Method Details

    • getService

      public static HighlighterService getService()
      This method getService returns the singleton instance of this class.
      Returns:
      the singleton instance
    • canHandle

      public boolean canHandle(String key)
      This method whether a given language is supported.
      Parameters:
      key - the name of the language; not null
      Returns:
      true iff the given language can be treated specially
    • highlight

      public void highlight(String key, PushbackReader reader, Writer out) throws IOException
      This method highlights a section for the given language.
      Parameters:
      key - the key of the language; not null
      reader - the input reader
      out - the target writer
      Throws:
      IOException - in case of an I/O error