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 />) />

@andreypopp
Copy link
Member

@davesnx this looks good to merge, or anything else is missing?

@davesnx
Copy link
Member Author

davesnx commented Nov 30, 2025

it's good to go

@andreypopp andreypopp force-pushed the bug-in-props-with-jsx branch from fb96e87 to 55a8e5f Compare November 30, 2025 20:36
@andreypopp andreypopp merged commit db4f63f into main Nov 30, 2025
1 of 9 checks passed
@andreypopp andreypopp deleted the bug-in-props-with-jsx branch November 30, 2025 20:36
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