package kkmarkdown
A safe markdown engine
Install
Dune Dependency
Authors
Maintainers
Sources
1.1.0.tar.gz
md5=a20517d95590d03ff5b7670323b8b0dd
sha512=97b3faa09e23ab88c5b4dcabe88f29e5c675b6bb4b0c9230ec105a70b01b37b54274cc0ab4a5eed84a754a99e3664e116a7aba6c9697e3669229985f1bf749be
doc/src/kkmarkdown.lib/FirstChar.ml.html
Source file FirstChar.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
type t = Any | One of char | OneOf of char list module Map (Elt : sig module type Rule val first_char : (module Rule) -> t end) = struct module M = Map.Make (Char) type t = (module Elt.Rule) list M.t let add c rule x = M.update c (fun rules -> Some (rule :: Option.value rules ~default:[])) x let mem = M.mem let find c x = Option.value (M.find_opt c x) ~default:[] let init all = List.fold_right (fun rule (map, any) -> match Elt.first_char rule with | Any -> (map, rule :: any) | One c -> (add c rule map, any) | OneOf cs -> let map = List.fold_left (fun map c -> add c rule map) map cs in (map, any)) all (M.empty, []) end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>