Skip to content

Multiline toplevel block do not work in .mli files #394

@panglesd

Description

@panglesd

If I have a markdown file

```ocaml
# let f = function
   | "" -> false
   | _ -> true
val f : string -> bool = <fun>
```

it gets accepted by ocaml-mdx test.

However, for the same file in .mli:

(** {[
# let f = function
   | "" -> false
   | _ -> true
val f : string -> bool = <fun>
]} *)

then ocaml-mdx test will complain that the first line is not ending with a ;; and report a syntax error, as the first line is considered as a complete block.

$ cat blibli.mli.corrected 
(** {[
      # let f = function;;
      Line 1, characters 17-19:
      Error: Syntax error
    ]} *)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions