-
Notifications
You must be signed in to change notification settings - Fork 527
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
prost-build v0.11.0 adds an extra space before RustDoc comment text #693
Comments
sd2k
added a commit
to sd2k/prost
that referenced
this issue
Aug 2, 2022
In v0.11.0 the `sanitize_line` function was updated to add a space to the beginning of non-empty RustDoc comments, but often those comments already contain a space. This commit updates the check to ensure the extra space is only added if it doesn't already exist. Fixes tokio-rs#693.
sd2k
added a commit
to sd2k/prost
that referenced
this issue
Aug 2, 2022
In v0.11.0 the `sanitize_line` function was updated to add a space to the beginning of non-empty RustDoc comments, but often those comments already contain a space. This commit updates the check to ensure the extra space is only added if it doesn't already exist. We also need to check that the line doesn't start with _multiple_ spaces, as in the case of multi-line list items in Markdown docs. These items _will_ need to be indented to match their list marker's indentation. Note that this commit actually modifies the `protobuf.rs` file as well because code blocks inside RustDoc comments were previously over-indented. Fixes tokio-rs#693.
LucioFranco
pushed a commit
that referenced
this issue
Aug 2, 2022
In v0.11.0 the `sanitize_line` function was updated to add a space to the beginning of non-empty RustDoc comments, but often those comments already contain a space. This commit updates the check to ensure the extra space is only added if it doesn't already exist. We also need to check that the line doesn't start with _multiple_ spaces, as in the case of multi-line list items in Markdown docs. These items _will_ need to be indented to match their list marker's indentation. Note that this commit actually modifies the `protobuf.rs` file as well because code blocks inside RustDoc comments were previously over-indented. Fixes #693.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It looks like something in how
prost-build
generates RustDoc comments has changed slightly between v0.10 and v0.11. There's now a single extra space between the///
and the rest of the comment, which wasn't there previously.This isn't a big deal or anything, but I noticed it increases the size of the diff for a prost upgrade significantly. See e.g. https://github.com/linkerd/linkerd2-proxy-api/pull/137/files#diff-e376e65ab87f7c7679472651d00eba584b6c134cd5ccf8a3b68f09e699944894
The text was updated successfully, but these errors were encountered: