aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/coqdoc/cpretty.mll8
-rw-r--r--tools/coqdoc/output.ml2
2 files changed, 5 insertions, 5 deletions
diff --git a/tools/coqdoc/cpretty.mll b/tools/coqdoc/cpretty.mll
index aa3c5b9d3b..5d210b2e60 100644
--- a/tools/coqdoc/cpretty.mll
+++ b/tools/coqdoc/cpretty.mll
@@ -504,9 +504,9 @@ rule coq_bol = parse
{ Lexing.new_line lexbuf; begin_show (); coq_bol lexbuf }
| space* end_show nl
{ Lexing.new_line lexbuf; end_show (); coq_bol lexbuf }
- | space* begin_details nl
- { Lexing.new_line lexbuf;
- let s = details_body lexbuf in
+ | space* begin_details (* At this point, the comment remains open,
+ and will be closed by [details_body] *)
+ { let s = details_body lexbuf in
Output.end_coq (); begin_details s; Output.start_coq (); coq_bol lexbuf }
| space* end_details nl
{ Lexing.new_line lexbuf;
@@ -728,7 +728,7 @@ and doc_bol = parse
else
Output.section lev (fun () -> ignore (doc None (from_string s)));
if eol then doc_bol lexbuf else doc None lexbuf }
- | (space_nl* as s) ('-'+ as line)
+ | ((space_nl* nl)? as s) (space* '-'+ as line)
{ let nl_count = count_newlines s in
match check_start_list line with
| Neither -> backtrack_past_newline lexbuf; Lexing.new_line lexbuf; doc None lexbuf
diff --git a/tools/coqdoc/output.ml b/tools/coqdoc/output.ml
index def1cbbcf8..32cf05e1eb 100644
--- a/tools/coqdoc/output.ml
+++ b/tools/coqdoc/output.ml
@@ -838,7 +838,7 @@ module Html = struct
printf "<a id=\"%s_%c\"></a><h2>%s %s</h2>\n" idx c (display_letter c) cat;
List.iter
(fun (id,(text,link,t)) ->
- let id' = prepare_entry id t in
+ let id' = escaped (prepare_entry id t) in
printf "<a href=\"%s\">%s</a> %s<br/>\n" link id' text) l;
printf "<br/><br/>"
end