this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: re-enable documentation links from source code

The code to extract documentation URLs from resolved paths was
commented out. Re-enable it with updated API calls — the
Url.from_identifier function now returns t directly instead of
a result type.

This allows source code views to link back to documentation pages
for cross-module references.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+7 -12
+7 -12
src/document/generator.ml
··· 265 265 266 266 let to_link { Lang.Source_info.documentation; implementation } = 267 267 let documentation = 268 - (* Since documentation link are not rendered, we comment the code to 269 - extract the href, and always output [None] *) 270 - ignore documentation; 271 - None 272 - (* let open Paths.Path.Resolved in *) 273 - (* match documentation with *) 274 - (* | Some (`Resolved p) when not (is_hidden (p :> t)) -> ( *) 275 - (* let id = identifier (p :> t) in *) 276 - (* match Url.from_identifier ~stop_before:false id with *) 277 - (* | Ok link -> Some link *) 278 - (* | _ -> None) *) 279 - (* | _ -> None *) 268 + match documentation with 269 + | Some (`Resolved p) when not (Paths.Path.Resolved.is_hidden (p :> Paths.Path.Resolved.t)) -> ( 270 + match Paths.Path.Resolved.identifier (p :> Paths.Path.Resolved.t) with 271 + | Some id -> 272 + Some (Url.from_identifier ~stop_before:false id) 273 + | None -> None) 274 + | _ -> None 280 275 in 281 276 let implementation = 282 277 match implementation with