Skip to content

rustdoc: Show the correct source filename in page titles, without .html - #78094

Merged
bors merged 2 commits into
rust-lang:masterfrom
camelid:rustdoc-fix-source-title
Oct 21, 2020
Merged

rustdoc: Show the correct source filename in page titles, without .html#78094
bors merged 2 commits into
rust-lang:masterfrom
camelid:rustdoc-fix-source-title

Conversation

@camelid

@camelidcamelid commented Oct 19, 2020

Copy link
Copy Markdown
Member

Previously the title would be

lib.rs.html -- source

if lib.rs was the actual source filename. Now the title is

lib.rs - source

@camelidcamelid added C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Oct 19, 2020
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @Mark-Simulacrum

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

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 19, 2020
@camelid

Copy link
Copy Markdown
MemberAuthor

Note that I haven't tested this locally yet, so this is draft.

Previously the title would be
lib.rs.html -- source
if `lib.rs` was the actual source filename. Now the title is
lib.rs – source
(note the en dash).
@camelid
camelidforce-pushed the rustdoc-fix-source-title branch from 5b8120d to 83ec8c1CompareOctober 19, 2020 02:39
@camelid

Copy link
Copy Markdown
MemberAuthor

Tested locally: it works!

@camelid
camelid marked this pull request as ready for review October 19, 2020 03:46
Comment threadsrc/librustdoc/html/sources.rs Outdated

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to just use a plain dash (-) rather than a Unicode en dash (–) since I think that's what other page titles use.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to use - for now so it's consistent; if you want to use then let's make a separate PR making all of the pages use at once.

@Mark-Simulacrum

Copy link
Copy Markdown
Member

r? @jyn514

I would suggest avoiding unrelated cleanups in PRs like this (i.e., the second commit here).

@jyn514jyn514 changed the title rustdoc: Show the correct source filename, without .htmlrustdoc: Show the correct source filename in page titles, without .htmlOct 20, 2020
Comment threadsrc/librustdoc/html/sources.rs Outdated
Comment threadsrc/librustdoc/html/sources.rs Outdated
Comment threadsrc/librustdoc/html/sources.rs Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to use - for now so it's consistent; if you want to use then let's make a separate PR making all of the pages use at once.

Comment threadlibrary/alloc/src/string.rs Outdated
@camelid

Copy link
Copy Markdown
MemberAuthor

I would suggest avoiding unrelated cleanups in PRs like this (i.e., the second commit here).

Sorry about that! I guess it feels like too much overhead to open a lot of PRs each doing a small thing, but I agree that it makes sense to split them up in the future.

@camelidcamelid mentioned this pull request Oct 20, 2020
@camelid
camelidforce-pushed the rustdoc-fix-source-title branch from 83ec8c1 to 243c8e9CompareOctober 20, 2020 20:25
@jyn514

Copy link
Copy Markdown
Member

@bors r+ rollup

Good catch, thanks :)

@bors

bors commented Oct 20, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 243c8e9 has been approved by jyn514

@borsbors 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 Oct 20, 2020
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Oct 21, 2020
…=jyn514
rustdoc: Show the correct source filename in page titles, without `.html`
Previously the title would be
lib.rs.html -- source
if `lib.rs` was the actual source filename. Now the title is
lib.rs - source
@JohnTitorJohnTitor mentioned this pull request Oct 21, 2020
@JohnTitorJohnTitor mentioned this pull request Oct 21, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 21, 2020
Rollup of 7 pull requests
Successful merges:
- rust-lang#77726 (Add Pin::static_ref, static_mut.)
- rust-lang#78002 (Tweak "object unsafe" errors)
- rust-lang#78056 (BTreeMap: split off most code of remove and split_off)
- rust-lang#78063 (Improve wording of "cannot multiply" type error)
- rust-lang#78094 (rustdoc: Show the correct source filename in page titles, without `.html`)
- rust-lang#78101 (fix static_ptr_ty for foreign statics)
- rust-lang#78118 (Inline const followups)
Failed merges:
r? `@ghost`
@bors
bors merged commit 72ae00b into rust-lang:masterOct 21, 2020
@rustbotrustbot added this to the 1.49.0 milestone Oct 21, 2020
@camelid
camelid deleted the rustdoc-fix-source-title branch October 21, 2020 18:50
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Oct 23, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-bugCategory: This is a bug.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-rustdocRelevant 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

@camelid@rust-highfive@Mark-Simulacrum@jyn514@bors@rustbot