aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLysxia2020-04-20 13:15:55 -0400
committerLysxia2020-04-20 13:15:55 -0400
commit51a938a260d989f11fb1cd1d7a0205c6183f3809 (patch)
tree25bdfae4a51261c99e12615d893708f467db6bc4 /tools
parent1a607cd9ff831e5393ec7eff8317ca4161161453 (diff)
parent9717acf868bf2d92ee846c0c28f8eb8611307a3f (diff)
Merge PR #12026: Granting coqdoc wish #7093: definitions link to themselves so as to give access to their url
Reviewed-by: Lysxia
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