Skip to content

Commit 6eeaa2c

Browse files
cuihtlauacCuihtlauac ALVARADO
andauthored
Raname Utils map_files into map_md_files (#2515)
* Raname Utils map_files into map_md_files * Rename function definition --------- Co-authored-by: Cuihtlauac ALVARADO <[email protected]>
1 parent 66641c6 commit 6eeaa2c

17 files changed

+20
-19
lines changed

tool/ood-gen/lib/academic_institution.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ let decode (fpath, (head, body_md)) =
2222
in
2323
Result.map (of_metadata ~body_md ~body_html) metadata
2424

25-
let all () = Utils.map_files decode "academic_institutions/*.md"
25+
let all () = Utils.map_md_files decode "academic_institutions/*.md"
2626

2727
let template () =
2828
Format.asprintf {|

tool/ood-gen/lib/book.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ let decode (fpath, (head, body)) =
2929
Result.map (of_metadata ~body_md ~body_html) metadata
3030

3131
let all () =
32-
Utils.map_files decode "books/*.md"
32+
Utils.map_md_files decode "books/*.md"
3333
|> List.sort (fun (b1 : t) (b2 : t) ->
3434
(* Sort the books by reversed publication date. *)
3535
String.compare b2.published b1.published)

tool/ood-gen/lib/changelog.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ let decode (fname, (head, body)) =
7676
metadata
7777

7878
let all () =
79-
Utils.map_files decode "changelog/*/*.md"
79+
Utils.map_md_files decode "changelog/*/*.md"
8080
|> List.sort (fun a b -> String.compare b.slug a.slug)
8181

8282
module ChangelogFeed = struct

tool/ood-gen/lib/cookbook.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ let all_categories_and_tasks () =
117117
let tasks, top_categories = all_categories_and_tasks ()
118118

119119
let all () =
120-
Utils.map_files (decode tasks) "cookbook/*/*.ml"
120+
Utils.map_md_files (decode tasks) "cookbook/*/*.ml"
121121
|> List.sort (fun (a : t) (b : t) -> String.compare b.slug a.slug)
122122
|> List.rev
123123

tool/ood-gen/lib/event.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ let decode (recurring_events : RecurringEvent.t list) (fpath, (head, body_md)) =
128128
metadata
129129

130130
let all () =
131-
Utils.map_files (decode (RecurringEvent.all ())) "events/*.md"
131+
Utils.map_md_files (decode (RecurringEvent.all ())) "events/*.md"
132132
|> List.sort (fun e1 e2 ->
133133
(* Sort the events by reversed start date. *)
134134
let t1 =

tool/ood-gen/lib/exercise.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ let compare_by_slug =
5555
fun (x : t) (y : t) -> compare (key x) (key y)
5656

5757
let all () =
58-
Utils.map_files decode "exercises/*.md" |> List.sort compare_by_slug
58+
Utils.map_md_files decode "exercises/*.md" |> List.sort compare_by_slug
5959

6060
let template () =
6161
Format.asprintf {|

tool/ood-gen/lib/industrial_user.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ let decode (fpath, (head, body_md)) =
2222
in
2323
Result.map (of_metadata ~body_md ~body_html) metadata
2424

25-
let all () = Utils.map_files decode "industrial_users/*.md"
25+
let all () = Utils.map_md_files decode "industrial_users/*.md"
2626

2727
let template () =
2828
Format.asprintf {|

tool/ood-gen/lib/is_ocaml_yet.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ let decode (fpath, (head, body_md)) =
4343
in
4444
Result.map (metadata_to_t ~body_html ~modify_categories) metadata
4545

46-
let all () = Utils.map_files decode "is_ocaml_yet/*.md"
46+
let all () = Utils.map_md_files decode "is_ocaml_yet/*.md"
4747

4848
let template () =
4949
Format.asprintf {|

tool/ood-gen/lib/news.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ let decode (fname, (head, body)) =
3535
Result.map (of_metadata ~slug ~body_html) metadata
3636

3737
let all () =
38-
Utils.map_files decode "news/*/*.md"
38+
Utils.map_md_files decode "news/*/*.md"
3939
|> List.sort (fun a b -> String.compare b.date a.date)
4040

4141
let template () =

tool/ood-gen/lib/page.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ let decode (file, (head, body_md)) =
3131
in
3232
Result.map (of_metadata ~slug ~body_md ~body_html) metadata
3333

34-
let all () = Utils.map_files decode "pages/*.md"
34+
let all () = Utils.map_md_files decode "pages/*.md"
3535

3636
let template () =
3737
Format.asprintf

0 commit comments

Comments
 (0)