scalatex.site

Highlighter

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.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Highlighter
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract 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" )

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  11. def highlight(string: String, lang: String): TypedTag[String]

    Highlight a short code snippet with the specified language

  12. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  14. final def notify(): Unit

    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  16. def pathMappings: Seq[(String, 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

  17. def ref[S, V](filepath: String, 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

  18. def referenceText[S, V](filepath: String, start: S, end: V)(implicit arg0: RefPath[S], arg1: RefPath[V]): (Int, Int, String)

  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  20. def toString(): String

    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped