Skip to content

Indent where clause in rustdoc #20269

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

Merged
merged 2 commits into from
Dec 30, 2014
Merged

Indent where clause in rustdoc #20269

merged 2 commits into from
Dec 30, 2014

Conversation

dirk
Copy link
Contributor

@dirk dirk commented Dec 28, 2014

  • Add around clause
  • CSS rule to format the span

(for issue #20176)

* Add <span class=‘where’> around clause
* CSS rule to format the span
(for rust-lang#20176)
@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see CONTRIBUTING.md for more information.

@huonw
Copy link
Member

huonw commented Dec 28, 2014

Thanks!

Would it be possible to post a screenshot of an example (or a rendered copy of the whole docs)?

@dirk
Copy link
Contributor Author

dirk commented Dec 28, 2014

Yup! Will toss one up here in the morning.

@dirk
Copy link
Contributor Author

dirk commented Dec 28, 2014

@huonw Here you go!

screen shot 2014-12-28 at 11 36 11 am

@tomjakubowski
Copy link
Contributor

Might look nicer to use ::before to insert some spaces rather than using padding with an em since we're using a monospace font. On modern browsers there's the ch unit too. Just a thought.

(I'm opposed to indenting where clauses in Rust code, instead keeping them on the next line but same column, but the community consensus seems to be tilting towards indenting them)

@dirk
Copy link
Contributor Author

dirk commented Dec 28, 2014

@tomjakubowski Oh I like the ::before CSS approach! Just pushed that.

@tomjakubowski
Copy link
Contributor

Screenshot? :)

@dirk
Copy link
Contributor Author

dirk commented Dec 28, 2014

Yup, here you are.

screen shot 2014-12-28 at 12 45 23 pm

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Dec 30, 2014
* Add <span class=‘where’> around clause
* CSS rule to format the span

(for issue rust-lang#20176)
@bors bors merged commit 57a3ef3 into rust-lang:master Dec 30, 2014
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

Successfully merging this pull request may close these issues.

6 participants