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

Field comments include unmeaningful newlines #85

Open
glacials opened this issue Jul 16, 2023 · 0 comments
Open

Field comments include unmeaningful newlines #85

glacials opened this issue Jul 16, 2023 · 0 comments

Comments

@glacials
Copy link

Comments on types correctly have single newlines stripped from them, but comments on fields do not. This is because of the behavior described in the documentation for ExtractGoComments:

When parsing type comments, we use the go/doc's Synopsis method to extract the first phrase only. Field comments, which tend to be much shorter, will include everything.

Synopsis is also the mechanism by which unmeaningful newlines are stripped, so we also lose this behavior for fields.

Related to (but not solved by) #67.

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

1 participant