package embedded_ocaml_templates
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
EML is a simple templating language that lets you generate text with plain OCaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
0.8.1.tar.gz
sha256=daa3dd038101d14166205ff35586e66210a155180d7ca7b246c0dd161f028c1c
sha512=5e58a98585721d7054123c538c1422d83970b3f249672e664b7d3d86f6ee43f4cf647984d15e04d15b7e7091f3768de4ee143f19c90296b21d84249c4f3f7374
doc/src/embedded_ocaml_templates.EML_runtime/EML_runtime.ml.html
Source file EML_runtime.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23(** [EML_runtime] provides runtime utilities for the code generated by the EML compiler. *) (** [escape s] is the HTML-escaped version of the string [s]. Characters '&', '<', '>', '"' and ''' are replaced by their HTMl encoding. *) let escape s = let buffer = Buffer.create (String.length s) in String.iter (function | '&' -> Buffer.add_string buffer "&" | '<' -> Buffer.add_string buffer "<" | '>' -> Buffer.add_string buffer ">" | '"' -> Buffer.add_string buffer """ | '\'' -> Buffer.add_string buffer "'" | c -> Buffer.add_char buffer c ) s ; Buffer.contents buffer
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>