Put titles in brackets.

This commit is contained in:
Fabien Freling 2014-12-12 23:25:41 +01:00
parent 062fd87bf5
commit a8571e3597

View file

@ -25,5 +25,8 @@ let remove_spaces str =
let evaluate str = let evaluate str =
match str with match str with
| str when is_url str -> | str when is_url str ->
SimpleHttp.get_http_title (SimpleHttp.get_body str) |> remove_spaces let title = SimpleHttp.get_http_title (SimpleHttp.get_body str) |> remove_spaces in
match title with
| Some t -> Some ("[ " ^ t ^ " ]")
| None -> None
| _ -> None | _ -> None