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

Remove extra newlines between -doc attributes and function definitions #110

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

sile
Copy link
Owner

@sile sile commented Sep 25, 2024

Resolves #109

Copilot Summary

This pull request introduces support for handling documentation attributes in the Erlang formatter. The changes mainly involve adding a new Doc attribute type and updating the formatting logic to accommodate it.

Support for Documentation Attributes

Parsing and Atoms

Tests

  • efmt_core/src/items/forms.rs: Added tests to ensure the Doc attribute is correctly parsed and formatted.
  • tests/testdata/doc.erl: Added test cases for the Doc attribute.
  • tests/testdata/long_spec.erl and tests/testdata/otp27_strings.erl: Minor adjustments to existing test data files. [1] [2]

@sile sile merged commit 93a684c into master Sep 25, 2024
10 checks passed
@sile sile deleted the handle-doc-attr branch September 25, 2024 11:29
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.

format of code with comments specified in ex_doc
1 participant