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 TypeMethodDescriptionbooleanThis method whether a given language is supported.static HighlighterServiceThis methodgetServicereturns the singleton instance of this class.voidhighlight(String key, PushbackReader reader, Writer out) This method highlights a section for the given language.
-
Method Details
-
getService
This methodgetServicereturns 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:
trueiff the given language can be treated specially
-
highlight
This method highlights a section for the given language.- Parameters:
key- the key of the language; notnullreader- the input readerout- the target writer- Throws:
IOException- in case of an I/O error
-