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

Comments scrub function a feature or a bug? #10

Open
ruanspies opened this issue Sep 30, 2022 · 0 comments
Open

Comments scrub function a feature or a bug? #10

ruanspies opened this issue Sep 30, 2022 · 0 comments

Comments

@ruanspies
Copy link

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.

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