Highlight a short code snippet with the specified language
A mapping of file-path-prefixes to URLs where the source can be accessed.
A mapping of file-path-prefixes to URLs where the source can be accessed. e.g.
Seq( "clones/scala-js" -> "https://github.com/scala-js/scala-js/blob/master", "" -> "https://github.com/lihaoyi/scalatex/blob/master" )
Will link any code reference from clones/scala-js to the scala-js github repo, while all other paths will default to the scalatex github repo.
If a path is not covered by any of these rules, no link is rendered
Grab a snippet of code from the given filepath, and highlight it.
Grab a snippet of code from the given filepath, and highlight it.
The file containing the code in question
Snippets used to navigate to the start of the snippet you want, from the beginning of the file
Snippets used to navigate to the end of the snippet you want, from the start of start of the snippet
An optional css class set on the rendered snippet to determine what language it gets highlighted as. If not given, it defaults to the class given in suffixMappings
A mapping of file name suffixes to highlight.js classes.
A mapping of file name suffixes to highlight.js classes. Usually something like:
Map( "scala" -> "scala", "js" -> "javascript" )
Lets you instantiate a Highlighter object. This can be used to reference snippets of code from files within your project via the
.ref
method, often used viahl.ref
wherehl
is a previously-instantiated Highlighter.