Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ncik-roberts opened this issue Jul 29, 2024 · 0 comments
Open

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

ncik-roberts opened this issue Jul 29, 2024 · 0 comments

Comments

@ncik-roberts
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant