Skip to content

Wrong comment generated #1188

Open
Open
@jeremy-ww

Description

@jeremy-ww

protobuf.js version: 6.8.8

Hi, I am using proto with comments like below, But what I am confused is that the attribution of the notes is confusing.

message HelloWorldError {
  // @required
  int32 code = 1;   // some comment belongs to `code`
  // @required
  string message = 2;
}
{
  "nested": {
    "HelloWorldError": {
      "fields": {
        "code": {
          "type": "int32",
          "id": 1,
          "comment": "@required"
        },
        "message": {
          "type": "string",
          "id": 2,
          "comment": "some comment belongs to `code`\n@required" // It's wrong here
        }
      },
      "comment": null
    }
  }
}``

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions