package hilite

  1. Overview
  2. Docs
Build time syntax highlighting

Install

Dune Dependency

Authors

Maintainers

Sources

hilite-0.1.0.tbz
sha256=de816a894c7f2974a316d3de802bcddd138b083a86173f6670690d526ab8af51
sha512=9bc9982bc05cf64c2c50117e469ff55335c0d8f3c9f0a95e678903e755cd71413780fa13d6126f355c2360a7319e78702b6b6c08533be0428ee2222a6fb60ef6

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'>()</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>=</span><span class='ocaml-source'> <"... (* string length 593; truncated *)
OCaml

Innovation. Community. Security.