package hilite

  1. Overview
  2. Docs
Build time syntax highlighting

Install

Dune Dependency

Authors

Maintainers

Sources

hilite-0.3.0.tbz
sha256=9b971208cc9ae0d159510beca981068d8c6cbbb74bf8fc21db650cd288ba198c
sha512=80d0968deb0b7835e713f895f17ddc4ac6f462c6299e76016d9005ffd81c5fd1476570cb1a870840137d660693a982200c4d67f2db96a1db7da405bbff2135f6

README.md.html

Hilite 🎨

A small library that generates HTML ready for syntax-highlighting with CSS by parsing markdown documents.

Currently only some OCaml-related syntaxes are supported.

let md = {|
"Hello World!" in OCaml looks like:

~~~ocaml
let () = print_endline "Hello World!"
~~~
|}

And converting is as simple as...

# Omd.of_string md |> Hilite.Md.transform |> Omd.to_html;;
- : string =
"<p>&quot;Hello World!&quot; in OCaml looks like:</p>\n<pre><code><span class='ocaml-keyword-other'>let</span><span class='ocaml-source'> </span><span class='ocaml-constant-language-unit'>()</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>=</span><span class='ocaml-sourc"... (* string length 608; truncated *)
OCaml

Innovation. Community. Security.