tangled
alpha
login
or
join now
jon.recoil.org
/
mime_printer
0
fork
atom
this repo has no description
0
fork
atom
overview
issues
pulls
pipelines
Svg gets special treatment
jon.recoil.org
3 years ago
759b8d89
1d232bb8
+2
2 changed files
expand all
collapse all
unified
split
mime_printer.ml
mime_printer.opam
+1
mime_printer.ml
···
14
14
15
15
let to_odoc x =
16
16
match String.split_on_char '/' x.mime_type, x.encoding with
17
17
+
| ["image"; "svg"], Noencoding -> Printf.sprintf "{%%html: %s %%}" x.data
17
18
| "image"::_, Base64 -> Printf.sprintf "{%%html: <img src=\"data:%s;base64,%s\" /> %%}" x.mime_type x.data
18
19
| "text"::"odoc"::[], Noencoding -> x.data
19
20
| _ -> ""
+1
mime_printer.opam
···
5
5
license: "ISC"
6
6
depends: [
7
7
"ocaml" (>= "4.04")
8
8
+
"dune"
8
9
]
9
10
build : [
10
11
["dune" "subst"] {pinned}