package stog

  1. Overview
  2. Docs

Highlighting code.

val external_highlight : opts:string -> string -> Xtmpl.Rewrite.tree list

Call the highlight command on the given string and make it produce xhtml code. Options are passed to the highlight command.

val highlight : ?lang:string -> ?opts:string -> string -> Xtmpl.Rewrite.tree list

Highlight the given code. If a lang and no option are given, then Higlo is tried first. If the language is unknown, we fallback to using external highlight command.

  • parameter lang

    is used to indicate the language. @opts are options passed to highlight command.