Package org.ctan.markup.markdown.syntax
Class HighlighterService
java.lang.Object
org.ctan.markup.markdown.syntax.HighlighterService
This class provides a singleton entry point for syntax highlighting.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
This method whether a given language is supported.static HighlighterService
This methodgetService
returns the singleton instance of this class.void
highlight
(String key, PushbackReader reader, Writer out) This method highlights a section for the given language.
-
Method Details
-
getService
This methodgetService
returns the singleton instance of this class.- Returns:
- the singleton instance
-
canHandle
This method whether a given language is supported.- Parameters:
key
- the name of the language; notnull
- Returns:
true
iff the given language can be treated specially
-
highlight
This method highlights a section for the given language.- Parameters:
key
- the key of the language; notnull
reader
- the input readerout
- the target writer- Throws:
IOException
- in case of an I/O error
-