Skip to content

Comments scrub function a feature or a bug? #10

Description

@ruanspies

Thanks for the great repo @pseudomuto.

We have been using protokit as part of our process of auto-generating API reference documentation from proto files. We are experiencing some issues caused by the scrub function in comments.go

func scrub(str string) string {

The function obviously trims white spaces but this causes grammar issues in the resulting comments.

Rather than having a single line string, proto comments are often structured in the following way to improve readability in the actual proto:

// The definition of a book resource in the
// context of the university library.
message Book{}

Due to the scrub function, this will cause the sentence to include thecontext rather than having a space between the words.

This is our primary use case for using comments so just want to check whether scrub is actually used for cases I am not envisioning and whether I can submit a PR to remove it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions