why3doc: fixed references to local files

parent 9c04c29f
......@@ -72,11 +72,15 @@ let tag_escape s =
let make_tag s l =
tag_escape s ^ "_" ^ string_of_int l
let local_files = Hashtbl.create 17
let add_local_file fn = Hashtbl.add local_files (Filename.chop_extension fn) ()
let is_local_file = Hashtbl.mem local_files
let make_url fn =
let url = fn ^ ".html" in
match !stdlib_url with
| None -> url
| Some www -> www ^ "/" ^ url
| Some www when not (is_local_file fn) -> www ^ "/" ^ url
| _ -> url
let anchor id = match id.id_loc with
| None -> raise Not_found
......
......@@ -12,6 +12,8 @@
open Why3
open Ident
val add_local_file: string -> unit
(* records definition locations *)
val set_output_dir: string option -> unit
......
......@@ -85,7 +85,7 @@ let print_file fname =
close_out c
let () =
(* Queue.iter Doc_def.add_file opt_queue; *)
Queue.iter Doc_def.add_local_file opt_queue;
try
Doc_def.set_output_dir !opt_output;
(* process files *)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment