trait Highlighter extends AnyRef
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 via hl.ref
where hl
is a previously-instantiated Highlighter.
- Self Type
- Highlighter
- Alphabetic
- By Inheritance
- Highlighter
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def ahk: lang
- def as: lang
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asciidoc: lang
- def autoResources: Seq[ResourcePath]
- def clj: lang
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
- def coffee: lang
- def diff: lang
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def erl: lang
- def ex: lang
- def fs: lang
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
highlight(string: String, lang: String): TypedTag[String]
Highlight a short code snippet with the specified language
- def highlightJs: ResourcePath
- def highlightJsSource: ResourcePath
- def hs: lang
- def hx: lang
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def js: lang
- val languages: Set[String]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nim: lang
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
pathMappings: Seq[(Path, String)]
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
- def rb: lang
-
def
ref[S, V](filePath: BasePath, start: S = Nil, end: V = Nil, className: String = null)(implicit arg0: RefPath[S], arg1: RefPath[V]): TypedTag[String]
Grab a snippet of code from the given filepath, and highlight it.
Grab a snippet of code from the given filepath, and highlight it.
- filePath
The file containing the code in question
- start
Snippets used to navigate to the start of the snippet you want, from the beginning of the file
- end
Snippets used to navigate to the end of the snippet you want, from the start of start of the snippet
- className
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
- def referenceText[S, V](filepath: Path, start: S, end: V)(implicit arg0: RefPath[S], arg1: RefPath[V]): (Int, Int, String)
- def scala: lang
- def sh: lang
- def style: String
-
def
suffixMappings: Map[String, String]
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" )
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- def ts: lang
- def vb: lang
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def webjars: ResourcePath
- def xml: lang
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated @deprecated
- Deprecated
(Since version ) see corresponding Javadoc for more information.