rustdoc: Submit examples to play.rust-lang.org
This grows a new option inside of rustdoc to add the ability to submit examples to an external website. If the `--markdown-playground-url` command line option or crate doc attribute `html_playground_url` is present, then examples will have a button on hover to submit the code to the playground specified. This commit enables submission of example code to play.rust-lang.org. The code submitted is that which is tested by rustdoc, not necessarily the exact code shown in the example. Closes #14654
This commit is contained in:
parent
cc63d4c61b
commit
e5bbbca33e
29 changed files with 186 additions and 43 deletions
|
@ -313,6 +313,19 @@ table th {
|
|||
padding: 5px;
|
||||
}
|
||||
|
||||
/* Code snippets */
|
||||
|
||||
.rusttest { display: none; }
|
||||
pre.rust { position: relative; }
|
||||
pre.rust a { transform: scaleX(-1); }
|
||||
.test-arrow {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 10px;
|
||||
font-size: 150%;
|
||||
}
|
||||
|
||||
@media (min-width: 1170px) {
|
||||
pre {
|
||||
font-size: 15px;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue