-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
rustdoc: avoid including line numbers in Google SERP snippets #109977
Conversation
notriddle
commented
Apr 5, 2023
r? @jsha (rustbot has picked a reviewer for you, use r? to override) |
@bors r+ rollup |
📌 Commit d9ee57f6e131711bb9b17ab3331ab3b737726464 has been approved by It is now in the queue for this repository. |
<pre class="src-line-numbers"> | ||
{# https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag#data-nosnippet-attr | ||
Do not show "1 2 3 4 5 ..." in web search results. #} | ||
<pre class="src-line-numbers" data-nosnippet> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be done on an HTML-element level with the data-nosnippet HTML attribute on span, div, and section elements.
pre
isn't in the list where that's supported.
@bors r- |
bb131ff
to
1b707f8
Compare
Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @Folyd, @jsha |
1b707f8
to
e9daab2
Compare
@rustbot review |
r? @the8472 |
@bors r=jsha,the8472 |
…, r=jsha,the8472 rustdoc: avoid including line numbers in Google SERP snippets ![image](https://user-images.githubusercontent.com/1593513/230141184-9171c8e0-de92-48e6-85b6-8baee35e6d86.png)
…, r=jsha,the8472 rustdoc: avoid including line numbers in Google SERP snippets ![image](https://user-images.githubusercontent.com/1593513/230141184-9171c8e0-de92-48e6-85b6-8baee35e6d86.png)
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#109395 (Fix issue when there are multiple candidates for edit_distance_with_substrings) - rust-lang#109755 (Implement support for `GeneratorWitnessMIR` in new solver) - rust-lang#109782 (Don't leave a comma at the start of argument list when removing arguments) - rust-lang#109977 (rustdoc: avoid including line numbers in Google SERP snippets) - rust-lang#109980 (Derive String's PartialEq implementation) - rust-lang#109984 (Remove f32 & f64 from MemDecoder/MemEncoder) - rust-lang#110004 (add `dont_check_failure_status` option in the compiler test) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup