Skip to content

Commit d13eac4

Browse files
committed
Children_order: fix error message
1 parent 70f7250 commit d13eac4

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/odoc/compile.ml

+1-2
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,7 @@ let mld ~parent_id ~parents_children ~output ~children ~warnings_options input =
249249
let zero_heading = Comment.find_zero_heading content in
250250
if (not (is_index_page name)) && has_children_order frontmatter then
251251
Error.raise_warning
252-
(Error.filename_only
253-
"Non-index page cannot specify (children _) in the frontmatter."
252+
(Error.filename_only "Non-index page cannot specify @children_order."
254253
input_s);
255254
let root =
256255
let file =

test/frontmatter/frontmatter.t/run.t

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ When there is one frontmatter, it is extracted from the content:
1010

1111
$ odoc compile one_frontmatter.mld
1212
File "one_frontmatter.mld":
13-
Warning: Non-index page cannot specify (children _) in the frontmatter.
13+
Warning: Non-index page cannot specify @children_order.
1414
$ odoc_print page-one_frontmatter.odoc | jq '.frontmatter'
1515
{
1616
"children": {
@@ -62,7 +62,7 @@ When there is more than one children order, we raise a warning and keep only the
6262
File "two_frontmatters.mld", line 2, characters 0-25:
6363
Warning: Duplicated @children_order entry
6464
File "two_frontmatters.mld":
65-
Warning: Non-index page cannot specify (children _) in the frontmatter.
65+
Warning: Non-index page cannot specify @children_order.
6666
$ odoc_print page-two_frontmatters.odoc | jq '.frontmatter'
6767
{
6868
"children": {

test/frontmatter/toc_order.t/run.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,4 @@ Some more parsing test:
105105
> EOF
106106
$ odoc compile --parent-id pkg/doc --output-dir _odoc errors/not_index.mld
107107
File "errors/not_index.mld":
108-
Warning: Non-index page cannot specify (children _) in the frontmatter.
108+
Warning: Non-index page cannot specify @children_order.

0 commit comments

Comments
 (0)