File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -463,6 +463,11 @@ let of_cmt (source_id : Odoc_model.Paths.Identifier.SourcePage.t)
463
463
Analysis. structure (env, uid_to_loc)
464
464
(id :> Odoc_model.Paths.Identifier.Signature.t )
465
465
[] structure
466
+ |> List. rev
467
+ (* Information are accumulated in a list. We need to have the
468
+ first info first in the list, to assign anchors with increasing
469
+ numbers, so that adding some content at the end of a file does
470
+ not modify the anchors for existing anchors. *)
466
471
in
467
472
let uid_to_loc_map = Shape.Uid.Tbl. to_map uid_to_loc in
468
473
let uid_to_id : Odoc_model.Paths.Identifier.SourceLocation.t Shape.Uid.Map.t =
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ let segr = Yoyo.Aa
13
13
let x = 2
14
14
let y = x + 1
15
15
let z a = if x = 1 || true then x + y else a
16
+ let z' a = if x = 1 || true then x + y else a
16
17
17
18
module A = struct end
18
19
module B = A
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ Files containing some values:
16
16
let x = 2
17
17
let y = x + 1
18
18
let z a = if x = 1 || true then x + y else a
19
+ let z' a = if x = 1 || true then x + y else a
19
20
20
21
module A = struct end
21
22
module B = A
@@ -128,6 +129,10 @@ Source links generated in the documentation:
128
129
<div class="spec value anchored" id="val-z" >
129
130
<a href="#val-z" class="anchor" ></a >
130
131
<a href="../root/source/a.ml.html#val-z" class="source_link" >Source</a >
132
+ --
133
+ <div class="spec value anchored" id="val-z'" >
134
+ <a href="#val-z'" class="anchor" ></a >
135
+ <a href="../root/source/a.ml.html#val-z'" class="source_link" >Source</a >
131
136
--
132
137
<div class="spec module anchored" id="module-A" >
133
138
<a href="#module-A" class="anchor" ></a >
@@ -264,6 +269,7 @@ Ids generated in the source code:
264
269
id= " L58"
265
270
id= " L59"
266
271
id= " L60"
272
+ id= " L61"
267
273
id= " type-t"
268
274
id= " type-truc"
269
275
id= " val-xazaz"
@@ -274,6 +280,8 @@ Ids generated in the source code:
274
280
id= " val-y"
275
281
id= " val-z"
276
282
id= " local_a_2"
283
+ id= " val-z'"
284
+ id= " local_a_3"
277
285
id= " module-A"
278
286
id= " module-B"
279
287
id= " module-type-T"
You can’t perform that action at this time.
0 commit comments