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

Fix a missing dot in the main item heading #92864

Merged
merged 1 commit into from
Jan 14, 2022

Conversation

Urgau
Copy link
Member

@Urgau Urgau commented Jan 13, 2022

This pull-request fix a missing · in the item header and also make use of   to explicit that the spaces are mandatory.

Before After
image image

PS: This was introduce yesterday by #92526 (the migration from Tera to Askama) and is not currently observable in the nightly doc.

@rust-highfive
Copy link
Collaborator

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez,@Folyd

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jan 13, 2022
@rust-highfive
Copy link
Collaborator

r? @jsha

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 13, 2022
@jsha
Copy link
Contributor

jsha commented Jan 13, 2022

Thanks for the fix!

make use of   to explicit that the spaces are mandatory.

  doesn't mean "spaces are mandatory," it means "browser may not break the line here." Is there any reason to require that? I think breaking the line on either side of the dot is reasonable.

@GuillaumeGomez
Copy link
Member

Why adding another character? It's already taking more space than before and the toggle is different enough, no?

@Urgau
Copy link
Member Author

Urgau commented Jan 13, 2022

  doesn't mean "spaces are mandatory," it means "browser may not break the line here."

I mean "mandatory for the html generation not necessarily for the browser", but it think it also make sense to dot break here.

Is there any reason to require that? I think breaking the line on either side of the dot is reasonable.

I tried many things: breaking before, after, trim, no trim, spaces, ... but the only thing that worked was to add a html entity after the space I think this is because of the Askama directives are messing with the spaces/tabs/newline.

@Urgau
Copy link
Member Author

Urgau commented Jan 13, 2022

Why adding another character? It's already taking more space than before and the toggle is different enough, no?

The current nightly is:
image

This PR just add the dot back nothing else. There is nothing new.

@GuillaumeGomez
Copy link
Member

Then nevermind me. :)

@jsha
Copy link
Contributor

jsha commented Jan 13, 2022

I think what you want is:

                <a class="srclink" href="{{href|safe}}" title="goto source code">source</a> · {# -#}

Notice that the "comment" at the end is {# -#}, not {#- -#}. That means "strip whitespace to the right of this comment, but not to the left.

@Urgau
Copy link
Member Author

Urgau commented Jan 13, 2022

I think what you want is:

                <a class="srclink" href="{{href|safe}}" title="goto source code">source</a> · {# -#}

Notice that the "comment" at the end is {# -#}, not {#- -#}. That means "strip whitespace to the right of this comment, but not to the left.

Oh! I tough this way the other way around, no wonder why it didn't worked when I tested it.

Remove the &nbsp and push. This is ready for another review.

@jsha
Copy link
Contributor

jsha commented Jan 13, 2022

@bors r+ rollup

Thanks so much!

@bors
Copy link
Contributor

bors commented Jan 13, 2022

📌 Commit d5871d0 has been approved by jsha

@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 Jan 13, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 14, 2022
Fix a missing dot in the main item heading

This pull-request fix a missing `·` in the item header ~~and also make use of `&nbsp;` to explicit that the spaces are mandatory~~.

| Before | After |
| --- | --- |
| ![image](https://user-images.githubusercontent.com/3616612/149393966-7cca6dc5-9a62-47fa-8c9c-18f936d43aa9.png) | ![image](https://user-images.githubusercontent.com/3616612/149393869-5ffd6e44-d91c-4ece-b69e-d103304f6626.png) |

PS: This was introduce yesterday by rust-lang#92526 (the migration from Tera to Askama) and is not currently observable in the nightly doc.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 14, 2022
Fix a missing dot in the main item heading

This pull-request fix a missing `·` in the item header ~~and also make use of `&nbsp;` to explicit that the spaces are mandatory~~.

| Before | After |
| --- | --- |
| ![image](https://user-images.githubusercontent.com/3616612/149393966-7cca6dc5-9a62-47fa-8c9c-18f936d43aa9.png) | ![image](https://user-images.githubusercontent.com/3616612/149393869-5ffd6e44-d91c-4ece-b69e-d103304f6626.png) |

PS: This was introduce yesterday by rust-lang#92526 (the migration from Tera to Askama) and is not currently observable in the nightly doc.
This was referenced Jan 14, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 14, 2022
…askrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#92045 (Don't fall back to crate-level opaque type definitions.)
 - rust-lang#92381 (Suggest `return`ing tail expressions in async functions)
 - rust-lang#92768 (Partially stabilize `maybe_uninit_extra`)
 - rust-lang#92810 (Deduplicate box deref and regular deref suggestions)
 - rust-lang#92818 (Update documentation for doc_cfg feature)
 - rust-lang#92840 (Fix some lints documentation)
 - rust-lang#92849 (Clippyup)
 - rust-lang#92854 (Use the updated Rust logo in rustdoc)
 - rust-lang#92864 (Fix a missing dot in the main item heading)

Failed merges:

 - rust-lang#92838 (Clean up some links in RELEASES)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 2ae4afd into rust-lang:master Jan 14, 2022
@rustbot rustbot added this to the 1.60.0 milestone Jan 14, 2022
@Urgau Urgau deleted the fix-missing-source-dot branch May 5, 2023 16:45
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.

6 participants