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

Don't add extra space before RustDoc comments #694

Commits on Aug 2, 2022

  1. Don't add extra space before RustDoc comments

    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.
    sd2k committed Aug 2, 2022
    Copy the full SHA
    c446b1f View commit details
    Browse the repository at this point in the history