Skip to content

Field comments include unmeaningful newlines #85

@glacials

Description

@glacials

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions