X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Flogger%2FhelmLogger.ml;h=ce535d26c1dfec76e89936d3eeb93d4488cf1c6c;hb=c5dad1d18ea23c4ce58d5f769ef2dc0a634240b8;hp=b4234b03cff9f0ec357f830d6bff6970de49878d;hpb=b6118150362700ed8f44b82cf6164d1c52c6d48f;p=helm.git diff --git a/helm/ocaml/logger/helmLogger.ml b/helm/ocaml/logger/helmLogger.ml index b4234b03c..ce535d26c 100644 --- a/helm/ocaml/logger/helmLogger.ml +++ b/helm/ocaml/logger/helmLogger.ml @@ -29,25 +29,25 @@ let string_of_html_msg = | `Error tag -> "Error: " ^ aux 0 tag | `Msg tag -> aux 0 tag +let rec html_of_html_tag = function + | `T s -> s + | `L msgs -> + sprintf "" + (String.concat "\n" + (List.map + (fun msg -> sprintf "
  • %s
  • " (html_of_html_tag msg)) + msgs)) + | `BR -> "
    \n" + | `DIV (indent, color, tag) -> + sprintf "
    \n%s\n
    " + (match color with None -> "" | Some color -> "color: " ^ color ^ "; ") + (float_of_int indent *. 0.5) + (html_of_html_tag tag) + let html_of_html_msg = - let rec string_of_html_tag = function - | `T s -> s - | `L msgs -> - sprintf "" - (String.concat "\n" - (List.map - (fun msg -> sprintf "
  • %s
  • " (string_of_html_tag msg)) - msgs)) - | `BR -> "
    \n" - | `DIV (indent, color, tag) -> - sprintf "
    \n%s\n
    " - (match color with None -> "" | Some color -> "color: " ^ color ^ "; ") - (float_of_int indent *. 0.5) - (string_of_html_tag tag) - in function - | `Error tag -> "Error: " ^ string_of_html_tag tag ^ "" - | `Msg tag -> string_of_html_tag tag + | `Error tag -> "Error: " ^ html_of_html_tag tag ^ "" + | `Msg tag -> html_of_html_tag tag let log_callbacks = ref []