Skip to content

OCaml: Spurious indent added after 'in' #1017

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

Open
jonsterling opened this issue May 29, 2025 · 2 comments
Open

OCaml: Spurious indent added after 'in' #1017

jonsterling opened this issue May 29, 2025 · 2 comments

Comments

@jonsterling
Copy link
Contributor

In Topiary 0.6.0, the following formatting was used:

    let attrs =
      let xmlns_attrs = List.map render_xmlns_prefix prefixes_to_add in
      attrs @ xmlns_attrs
    in
    [P.std_tag name attrs content]

In Topiary 0.6.1, this has turned to the following, which I consider undesirable:

    let attrs =
      let xmlns_attrs = List.map render_xmlns_prefix prefixes_to_add in
      attrs @ xmlns_attrs
    in
      [P.std_tag name attrs content]

I believe that this the circumstances under which this occurs at the following: when both the definiens of the let-binding is multi-line, and in is not followed by another let.

@yannham
Copy link
Member

yannham commented Jun 12, 2025

I haven't looked deeply, but might be related to #939 (comment) ?

@yannham
Copy link
Member

yannham commented Jun 12, 2025

(And thus related to #943)

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

2 participants