Skip to content

Commit 1cf7b1e

Browse files
committed
Rollup merge of #26967 - tsurai:master, r=steveklabnik
The very first code fragment off every struct and trait documentation page generates wrong playground code. This pull request adjusts ```playpen.js``` to only create a link for real examples. Documentation: ```rust pub struct String { // some fields omitted } ``` Playground: ```rust Struct std::String [−] [src] ``` r? @steveklabnik
2 parents ad930f4 + 9e96982 commit 1cf7b1e

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
@@ -17,7 +17,7 @@ document.addEventListener('DOMContentLoaded', function() {
1717
}
1818

1919
var featureRegexp = new RegExp('^\s*#!\\[feature\\(\.*?\\)\\]');
20-
var elements = document.querySelectorAll('pre.rust');
20+
var elements = document.querySelectorAll('pre.rust-example-rendered');
2121

2222
Array.prototype.forEach.call(elements, function(el) {
2323
el.onmouseover = function(e) {

0 commit comments

Comments
 (0)