"^([^.]*\\.[^.]*)((\\.body)|(\\.proof_tree)|(\\.types))?(\\.ann)?$"
in
let (types_RE, types_ann_RE, body_RE, body_ann_RE,
- proof_tree_RE, proof_tree_ann_RE) =
+ proof_tree_RE, proof_tree_ann_RE, trailing_slash_RE) =
(Pcre.regexp "\\.types$", Pcre.regexp "\\.types\\.ann$",
Pcre.regexp "\\.body$", Pcre.regexp "\\.body\\.ann$",
- Pcre.regexp "\\.proof_tree$", Pcre.regexp "\\.proof_tree\\.ann$")
+ Pcre.regexp "\\.proof_tree$", Pcre.regexp "\\.proof_tree\\.ann$",
+ Pcre.regexp "/$")
in
let (slash_RE, til_slash_RE, no_slashes_RE) =
(Pcre.regexp "/", Pcre.regexp "^.*/", Pcre.regexp "^[^/]*$")
ls_remote regexp
else begin
let pat =
- "^" ^ regexp
+ Pcre.replace ~rex:trailing_slash_RE ("^" ^ regexp)
(* (match lsuri with Cic p -> ("cic:" ^ p) | Theory p -> ("theory:" ^ p)) *)
in
let (dir_RE, obj_RE) =