Skip to content

Feature wish: better error messages around improper ;;  #454

@ncik-roberts

Description

@ncik-roberts

Currently if you use ;; in the middle of an mdx code block you get an error, but only inconsistently:

This is OK:
```ocaml
type t = A;;
```_

This gives a parse error:
```ocaml
module M = struct
  type t = A;;
end
```_
```mdx-error
Error: Syntax error: 'end' expected
  This 'struct' might be unmatched
Error: Syntax error
```_

(The ```_s above are just meant to get github formatting to cooperate.)

I think mdx is chopping off input at the first ;; and attempting to parse it. Maybe it could generate a better error message and suggest removing the ;; if that is a suffix of the input.

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