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

rustdoc: avoid including line numbers in Google SERP snippets #109977

Merged
merged 1 commit into from
Apr 6, 2023

Conversation

notriddle
Copy link
Contributor

image

@rustbot
Copy link
Collaborator

rustbot commented Apr 5, 2023

r? @jsha

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Apr 5, 2023
@jsha
Copy link
Contributor

jsha commented Apr 5, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Apr 5, 2023

📌 Commit d9ee57f6e131711bb9b17ab3331ab3b737726464 has been approved by jsha

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 5, 2023
<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>
Copy link
Member

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.

@the8472
Copy link
Member

the8472 commented Apr 5, 2023

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 5, 2023
@notriddle notriddle force-pushed the notriddle/data-nosnippet branch 2 times, most recently from bb131ff to 1b707f8 Compare April 5, 2023 22:42
@rustbot
Copy link
Collaborator

rustbot commented Apr 5, 2023

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

@notriddle notriddle force-pushed the notriddle/data-nosnippet branch from 1b707f8 to e9daab2 Compare April 5, 2023 22:43
@notriddle
Copy link
Contributor Author

@rustbot review

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 5, 2023
@notriddle
Copy link
Contributor Author

r? @the8472

@rustbot rustbot assigned the8472 and unassigned jsha Apr 5, 2023
@the8472
Copy link
Member

the8472 commented Apr 6, 2023

@bors r=jsha,the8472

@bors
Copy link
Contributor

bors commented Apr 6, 2023

📌 Commit e9daab2 has been approved by jsha,the8472

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 6, 2023
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Apr 6, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 6, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 6, 2023
…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
@bors bors merged commit 08ab38a into rust-lang:master Apr 6, 2023
@rustbot rustbot added this to the 1.70.0 milestone Apr 6, 2023
@notriddle notriddle deleted the notriddle/data-nosnippet branch April 6, 2023 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants