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

Bug: --parse-docstrings violates margin #2549

Closed
mmottl opened this issue May 11, 2024 · 1 comment · Fixed by #2550
Closed

Bug: --parse-docstrings violates margin #2549

mmottl opened this issue May 11, 2024 · 1 comment · Fixed by #2550

Comments

@mmottl
Copy link

mmottl commented May 11, 2024

Describe the bug

Passing --parse-docstrings may lead to output that violates the configured margin.

❯ ocamlformat --version
0.26.2

How to Reproduce

Formatted file foo.ml:

(** xxxxx xx xxxxxx xxxxxx xxxxxx xxxxx xxxxxxx xxx xxxxxx xxx xxxx
    xxxxxxxxxx. *)

Command line (explicitly sets a margin of 80):

ocamlformat --enable-outside-detected-project -m 80 --parse-docstrings foo.ml

Output has an 82 character line:

(** xxxxx xx xxxxxx xxxxxx xxxxxx xxxxx xxxxxxx xxx xxxxxx xxx xxxx xxxxxxxxxx. *)
@Julow
Copy link
Collaborator

Julow commented May 14, 2024

Thanks for reporting. Should be fixed by #2550

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

Successfully merging a pull request may close this issue.

2 participants