Skip to content

Commit c4b6839

Browse files
committed
Consider directory targets for markdown
1 parent 00fb782 commit c4b6839

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/dune_rules/odoc.ml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,9 +1174,11 @@ let gen_rules sctx ~dir rest =
11741174
>>> setup_toplevel_index_rule sctx Json)
11751175
| [ "_markdown" ] -> has_rules (setup_toplevel_index_rule sctx Markdown)
11761176
| [ "_markdown"; lib_unique_name_or_pkg ] ->
1177+
let ctx = Super_context.context sctx in
1178+
let directory_targets = Path.Build.Map.singleton dir Loc.none in
11771179
has_rules
1178-
(let ctx = Super_context.context sctx in
1179-
let* lib, lib_db = Scope_key.of_string (Context.name ctx) lib_unique_name_or_pkg in
1180+
~directory_targets
1181+
(let* lib, lib_db = Scope_key.of_string (Context.name ctx) lib_unique_name_or_pkg in
11801182
let* lib =
11811183
let+ lib = Lib.DB.find lib_db lib in
11821184
Option.bind ~f:Lib.Local.of_lib lib

0 commit comments

Comments
 (0)