Rollup merge of #23082 - killercup:patch-6, r=alexcrichton
This should fix #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).
This commit is contained in:
commit
a14d6a9052
@ -15,7 +15,7 @@
|
||||
if (window.playgroundUrl) {
|
||||
$('pre.rust').hover(function() {
|
||||
var a = $('<a>').text('⇱').attr('class', 'test-arrow');
|
||||
var code = $(this).siblings(".rusttest").text();
|
||||
var code = $(this).prev(".rusttest").text();
|
||||
a.attr('href', window.playgroundUrl + '?code=' +
|
||||
encodeURIComponent(code));
|
||||
a.attr('target', '_blank');
|
||||
|
Loading…
x
Reference in New Issue
Block a user