book: Emit links to play.rust-lang.org to run examples
Had to fix a bug in `--markdown-playground-url` for markdown files in rustdoc as well as adding some necessary JS to the rustbook output as well. Closes #21553
This commit is contained in:
parent
0f3183f42b
commit
947f1b66cb
3 changed files with 12 additions and 1 deletions
|
@ -59,7 +59,7 @@ pub fn render(input: &str, mut output: PathBuf, matches: &getopts::Matches,
|
|||
let input_str = load_or_return!(input, 1, 2);
|
||||
let playground = matches.opt_str("markdown-playground-url");
|
||||
if playground.is_some() {
|
||||
markdown::PLAYGROUND_KRATE.with(|s| { *s.borrow_mut() = None; });
|
||||
markdown::PLAYGROUND_KRATE.with(|s| { *s.borrow_mut() = Some(None); });
|
||||
}
|
||||
let playground = playground.unwrap_or("".to_string());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue