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)
463463 Analysis. structure (env, uid_to_loc)
464464 (id :> Odoc_model.Paths.Identifier.Signature.t )
465465 [] 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. *)
466471 in
467472 let uid_to_loc_map = Shape.Uid.Tbl. to_map uid_to_loc in
468473 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
1313let x = 2
1414let y = x + 1
1515let z a = if x = 1 || true then x + y else a
16+ let z' a = if x = 1 || true then x + y else a
1617
1718module A = struct end
1819module B = A
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ Files containing some values:
1616 let x = 2
1717 let y = x + 1
1818 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
1920
2021 module A = struct end
2122 module B = A
@@ -128,6 +129,10 @@ Source links generated in the documentation:
128129 <div class="spec value anchored" id="val-z" >
129130 <a href="#val-z" class="anchor" ></a >
130131 <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 >
131136 --
132137 <div class="spec module anchored" id="module-A" >
133138 <a href="#module-A" class="anchor" ></a >
@@ -264,6 +269,7 @@ Ids generated in the source code:
264269 id= " L58"
265270 id= " L59"
266271 id= " L60"
272+ id= " L61"
267273 id= " type-t"
268274 id= " type-truc"
269275 id= " val-xazaz"
@@ -274,6 +280,8 @@ Ids generated in the source code:
274280 id= " val-y"
275281 id= " val-z"
276282 id= " local_a_2"
283+ id= " val-z'"
284+ id= " local_a_3"
277285 id= " module-A"
278286 id= " module-B"
279287 id= " module-type-T"
You can’t perform that action at this time.
0 commit comments