package forester

  1. Overview
  2. Docs
A tool for tending mathematical forests

Install

Dune Dependency

Authors

Maintainers

Sources

3.1.0.tar.gz
md5=3512b493a31b0d1073ba4e48e8058493
sha512=b6e5ad2f86132d1874cb943546375e2f1b987a0c65628d71f17827f1ff7435df476c86fb135b34b3ff302f99ea54a21b90730257e12aa41cce170fae57c422b0

doc/src/forester.render/Render_util.ml.html

Source file Render_util.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
open Core
module E = Render_effect.Perform

let rec expand_title_with_parents (tree : Sem.tree) title =
  match tree.fm.parent with
  | None ->
    title
  | Some parent_addr ->
    match E.get_doc parent_addr with
    | None ->
      title
    | Some parent ->
      let chevron = [Range.locate_opt None @@ Sem.Text " › "] in
      let parent_title = parent.fm.title |> Option.map @@ expand_title_with_parents parent in
      let parent_link =
        [Range.locate_opt None @@
         Sem.Link {dest = parent_addr; modifier = Some `Sentence_case; title = parent_title}]
      in
      parent_link @ chevron @ title
OCaml

Innovation. Community. Security.