diff --git a/src/odoc/compile.ml b/src/odoc/compile.ml index b1581f3d44..d3d2000ecb 100644 --- a/src/odoc/compile.ml +++ b/src/odoc/compile.ml @@ -249,8 +249,7 @@ let mld ~parent_id ~parents_children ~output ~children ~warnings_options input = let zero_heading = Comment.find_zero_heading content in if (not (is_index_page name)) && has_children_order frontmatter then Error.raise_warning - (Error.filename_only - "Non-index page cannot specify (children _) in the frontmatter." + (Error.filename_only "Non-index page cannot specify @children_order." input_s); let root = let file = diff --git a/test/frontmatter/frontmatter.t/run.t b/test/frontmatter/frontmatter.t/run.t index 8b17511e9a..4bdb9baac7 100644 --- a/test/frontmatter/frontmatter.t/run.t +++ b/test/frontmatter/frontmatter.t/run.t @@ -10,7 +10,7 @@ When there is one frontmatter, it is extracted from the content: $ odoc compile one_frontmatter.mld File "one_frontmatter.mld": - Warning: Non-index page cannot specify (children _) in the frontmatter. + Warning: Non-index page cannot specify @children_order. $ odoc_print page-one_frontmatter.odoc | jq '.frontmatter' { "children": { @@ -62,7 +62,7 @@ When there is more than one children order, we raise a warning and keep only the File "two_frontmatters.mld", line 2, characters 0-25: Warning: Duplicated @children_order entry File "two_frontmatters.mld": - Warning: Non-index page cannot specify (children _) in the frontmatter. + Warning: Non-index page cannot specify @children_order. $ odoc_print page-two_frontmatters.odoc | jq '.frontmatter' { "children": { diff --git a/test/frontmatter/toc_order.t/run.t b/test/frontmatter/toc_order.t/run.t index 16a65f3583..754cdd0257 100644 --- a/test/frontmatter/toc_order.t/run.t +++ b/test/frontmatter/toc_order.t/run.t @@ -105,4 +105,4 @@ Some more parsing test: > EOF $ odoc compile --parent-id pkg/doc --output-dir _odoc errors/not_index.mld File "errors/not_index.mld": - Warning: Non-index page cannot specify (children _) in the frontmatter. + Warning: Non-index page cannot specify @children_order.