We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In unstable from melange's playground, it breaks code missing { } when a function has a sequence:
{
}
onEvent "/echo" (fun request -> let request_stream = get_body_stream request in stream ~headers:[ ("Content-Type", "application/octet-stream") ] (fun response_stream -> Js.log response_stream))
refmt generates
onEvent("/echo", request => let request_stream = get_body_stream(request); stream( ~headers=[("Content-Type", "application/octet-stream")], response_stream => Js.log(response_stream) ); );
correct version
onEvent("/echo", request => { let request_stream = get_body_stream(request); stream( ~headers=[("Content-Type", "application/octet-stream")], response_stream => Js.log(response_stream) ); });
https://melange.re/unstable/playground/?language=OCaml&code=b25FdmVudCAiL2VjaG8iIChmdW4gcmVxdWVzdCAtPgogICAgbGV0IHJlcXVlc3Rfc3RyZWFtID0gZ2V0X2JvZHlfc3RyZWFtIHJlcXVlc3QgaW4KICAgIHN0cmVhbQogICAgICB%2BaGVhZGVyczpbICgiQ29udGVudC1UeXBlIiwgImFwcGxpY2F0aW9uL29jdGV0LXN0cmVhbSIpIF0KICAgICAgKGZ1biByZXNwb25zZV9zdHJlYW0gLT4gSnMubG9nIHJlc3BvbnNlX3N0cmVhbSkpCg%3D%3D&live=on
The text was updated successfully, but these errors were encountered:
fix: callback sequences formatted back from .ml
3590834
fixes #2798
6455bb6
Successfully merging a pull request may close this issue.
In unstable from melange's playground, it breaks code missing
{
}
when a function has a sequence:refmt generates
correct version
https://melange.re/unstable/playground/?language=OCaml&code=b25FdmVudCAiL2VjaG8iIChmdW4gcmVxdWVzdCAtPgogICAgbGV0IHJlcXVlc3Rfc3RyZWFtID0gZ2V0X2JvZHlfc3RyZWFtIHJlcXVlc3QgaW4KICAgIHN0cmVhbQogICAgICB%2BaGVhZGVyczpbICgiQ29udGVudC1UeXBlIiwgImFwcGxpY2F0aW9uL29jdGV0LXN0cmVhbSIpIF0KICAgICAgKGZ1biByZXNwb25zZV9zdHJlYW0gLT4gSnMubG9nIHJlc3BvbnNlX3N0cmVhbSkpCg%3D%3D&live=on
The text was updated successfully, but these errors were encountered: