Skip to content

Conversation

@davesnx
Copy link
Member

@davesnx davesnx commented Nov 22, 2025

Before it removed the parens, causing invalid syntax
let make ~children = <LabeledInput labelElement=(<Icon.Edit />) />

ocamlformat-mlx: Cannot process "src/components/ProjectInfoEditor.mlx".
  Please report this bug at https://github.com/ocaml-ppx/ocamlformat/issues.
  BUG: generating invalid ocaml syntax.

This PR checks if it's a JSX expr and adds them

$ echo 'let _ = <div element=(<span />) />' | fmt
let _ = <div element=(<span />) />
$ echo 'let _ = <div element=(<Componient />) />' | fmt
let _ = <div element=(<Componient />) />
$ echo 'let _ = <Big element=(<Component />) />' | fmt
let _ = <Big element=(<Component />) />

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

Successfully merging this pull request may close these issues.

3 participants