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

Different code snippets from the same doc string mixed up in playpen #22615

Closed
glacjay opened this issue Feb 21, 2015 · 1 comment · Fixed by #23082
Closed

Different code snippets from the same doc string mixed up in playpen #22615

glacjay opened this issue Feb 21, 2015 · 1 comment · Fixed by #23082
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@glacjay
Copy link
Contributor

glacjay commented Feb 21, 2015

For example, http://doc.rust-lang.org/std/cell/index.html, when I click the top right arrow of the first code snippet, there are not only code from this snippet, but also the following snippets, one followed the other.

@kmcallister kmcallister added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Feb 21, 2015
@kmcallister kmcallister changed the title Different code snippets from the same doc string mixed up in playgen. Different code snippets from the same doc string mixed up in playpen Feb 21, 2015
@killercup
Copy link
Member

Just ran into this at the docs for HashMap.

Looks like this line of JavaScript selects to much code when building the code for the playpen link. I guess it should be prev instead of siblings. I'll look into writing a short PR.

killercup added a commit to killercup/rust that referenced this issue Mar 5, 2015
Manishearth added a commit to Manishearth/rust that referenced this issue Mar 6, 2015
 This should fix rust-lang#22615. Previously, the playpen links grabbed the content of all `.rusttest` containers on the same level to build the URL. Now they just select the one before the `pre` they are shown in.

I have only tested this by changing the file in my local build of the docs (not by running rustdoc itself).
Manishearth added a commit to Manishearth/rust that referenced this issue Mar 6, 2015
 This should fix rust-lang#22615. Previously, the playpen links grabbed the content of all `.rusttest` containers on the same level to build the URL. Now they just select the one before the `pre` they are shown in.

I have only tested this by changing the file in my local build of the docs (not by running rustdoc itself).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants