summaryrefslogtreecommitdiffabout
diff options
context:
space:
mode:
authorArmaël Guéneau <armael.gueneau@ens-lyon.fr>2016-09-26 15:03:29 (CEST)
committer Armaël Guéneau <armael.gueneau@ens-lyon.fr>2016-09-26 15:04:35 (CEST)
commit4cf763282a0ffcc8b9e1141a563758a389f3ab28 (patch)
treed781bd67dfb0a071e7e89b5b7c4e9bc7f934f135
parent4fb71c00c73cc94e81aeaf70dc2adf1f54e8c516 (diff)
downloaddict-4cf763282a0ffcc8b9e1141a563758a389f3ab28.tar.gz
dict-4cf763282a0ffcc8b9e1141a563758a389f3ab28.tar.bz2
whitespace cleanup
-rw-r--r--dict.ml10
1 files changed, 5 insertions, 5 deletions
diff --git a/dict.ml b/dict.ml
index 30f69a2..1b52327 100644
--- a/dict.ml
+++ b/dict.ml
@@ -16,7 +16,7 @@ let parse_dict s =
(** Reactive values *)
-(* Dictionnary *)
+(* Dictionnary *)
let dict, set_dict =
let initial_dict =
match Dict_init.read dict_name with
@@ -24,7 +24,7 @@ let dict, set_dict =
| Some contents -> parse_dict contents in
React.S.create initial_dict
-(* Search pattern *)
+(* Search pattern *)
let search, set_search = React.S.create ""
(* List of results *)
@@ -42,12 +42,12 @@ let results :
List.filter_map (fun l ->
let matching = ref false in
- let l' =
+ let l' =
List.map (fun s ->
String.Exceptionless.find (String.lowercase s) search
|> Option.map_default (fun i ->
matching := true;
- let s' =
+ let s' =
[pcdata (String.slice ~first:0 ~last:i s);
b [pcdata (String.slice ~first:i ~last:(i + len) s)];
pcdata (String.slice ~first:(i + len) s)] in
@@ -112,7 +112,7 @@ let () =
main##appendChild (To_dom.of_node results_html) |> ignore;
return ()
);
-
+
Lwt.async (fun _ ->
Lwt_js_events.limited_loop ~elapsed_time:0.2
Lwt_js_events.input input_node (fun _ _ ->