Skip to content

Commit 1eb37bf

Browse files
committed
Fix Playpen Links Containing Multiple Examples
Fixes #22615.
1 parent 68740b4 commit 1eb37bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/html/static/playpen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
if (window.playgroundUrl) {
1616
$('pre.rust').hover(function() {
1717
var a = $('<a>').text('⇱').attr('class', 'test-arrow');
18-
var code = $(this).siblings(".rusttest").text();
18+
var code = $(this).prev(".rusttest").text();
1919
a.attr('href', window.playgroundUrl + '?code=' +
2020
encodeURIComponent(code));
2121
a.attr('target', '_blank');

0 commit comments

Comments
 (0)