Skip to content

Commit

Permalink
Disable inlining of expansions
Browse files Browse the repository at this point in the history
We keep the inlining code for now, as it is partially used for other
purposes (variants, records) and in case we'd want to add it back.
  • Loading branch information
Julow committed Jan 28, 2022
1 parent 0d5e556 commit 0c45ebb
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/markdown/link.ml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,7 @@ let as_filename (url : Url.Path.t) =
let str_path = String.concat Fpath.dir_sep (dir @ [ path ]) in
Fpath.(v str_path + ".md")

let rec is_class_or_module_path (url : Url.Path.t) =
match url.kind with
| `Module | `LeafPage | `Page | `Class -> (
match url.parent with
| None -> true
| Some url -> is_class_or_module_path url)
| _ -> false

let should_inline x = not @@ is_class_or_module_path x
let should_inline _ = false

let files_of_url url =
if is_class_or_module_path url then [ as_filename url ] else []
if should_inline url then [] else [ as_filename url ]

0 comments on commit 0c45ebb

Please sign in to comment.