package ochre

  1. Overview
  2. Docs
Syntax highlighter using TextMate grammars and themes

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ochre-1.1.0.tbz
sha256=a8e38fbcd22fbb68b0f7d93b36a2ba1670e8bd061b43a0177226738307183a32
sha512=7b344c3812be283b0101078564e564732f878ad226c7ce0212c9e9139fb41a291e4d31ad52c949f2978c48e04240d4d22b5b4ae63808e15a21c44a2fbeed8a22

doc/ochre/Ochre/Html_options/index.html

Module Ochre.Html_optionsSource

style_mode

Sourcetype style_mode =
  1. | Inline_styles
    (*

    Emit style="color:..." on each <span>. Default.

    *)
  2. | Css_classes of {
    1. class_prefix : string;
    }
    (*

    Replace inline styles with deterministic CSS class names.

    *)

How token colors are expressed in the output.

default_color

Sourcetype default_color =
  1. | Default_color
    (*

    Emit inline color: and background-color:. Default.

    *)
  2. | No_default_color
    (*

    Suppress inline colors. All colors from CSS custom properties.

    *)

Whether the primary theme's colors are emitted inline.

t

Sourcetype t = {
  1. style_mode : style_mode;
  2. default_color : default_color;
  3. pre_class : string option;
  4. code_class : string option;
  5. line_numbers : bool;
  6. css_variable_prefix : string;
  7. scopes_as_data_attrs : bool;
}

The full set of HTML rendering options.

default

Sourceval default : t

Default options (backward compatible with legacy output).

make

Sourceval make : ?style_mode:style_mode -> ?default_color:default_color -> ?pre_class:string -> ?code_class:string -> ?line_numbers:bool -> ?css_variable_prefix:string -> ?scopes_as_data_attrs:bool -> unit -> t

Construct options with defaults for any unspecified fields.

let opts =
  Ochre.Html_options.make ~line_numbers:true
    ~default_color:No_default_color ()