aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorHugo Herbelin2020-04-05 16:47:01 +0200
committerLysxia2020-04-20 12:58:15 -0400
commite41be40fb1675311801f8c7f7039a44575a45fff (patch)
treec384e42359cf2853263c787b673a2dffec2770b0 /tools
parent1a607cd9ff831e5393ec7eff8317ca4161161453 (diff)
Granting coqdoc wish #7093 (definitions link to themselves).
Co-Authored-By: Xia Li-yao <Lysxia@users.noreply.github.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/coqdoc/output.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/coqdoc/output.ml b/tools/coqdoc/output.ml
index 04725aa26f..d6f51d7b78 100644
--- a/tools/coqdoc/output.ml
+++ b/tools/coqdoc/output.ml
@@ -659,7 +659,8 @@ module Html = struct
let reference s r =
match r with
| Def (fullid,ty) ->
- printf "<a name=\"%s\">" (sanitize_name fullid);
+ let s' = sanitize_name fullid in
+ printf "<a id=\"%s\" class=\"idref\" href=\"#%s\">" s' s';
printf "<span class=\"id\" title=\"%s\">%s</span></a>" (type_name ty) s
| Ref (m,fullid,ty) ->
ident_ref m fullid (type_name ty) s