Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust Playground Integration for Code Blocks #402

Closed
alex-ozdemir opened this issue Jan 14, 2017 · 6 comments
Closed

Rust Playground Integration for Code Blocks #402

alex-ozdemir opened this issue Jan 14, 2017 · 6 comments
Labels
blocked upstream Blocked on a change that needs to happen in a different repo first Online only
Milestone

Comments

@alex-ozdemir
Copy link

A various points in the book there are very pretty formatted blocks of code.

It'd be cool to have a "run" button. Even cooler if it could be optionally disabled on a codeblock-by-codeblock basis. Perhaps disabling it could correlated with some visual cue for "not entirely working".

@alex-ozdemir
Copy link
Author

I'd be happy to tackle this if there's any interest.

@steveklabnik
Copy link
Member

This should probably be implemented in mdbook.

@steveklabnik steveklabnik added the blocked upstream Blocked on a change that needs to happen in a different repo first label Jan 14, 2017
@carols10cents
Copy link
Member

@carols10cents carols10cents added this to the all milestone Feb 20, 2017
@carols10cents
Copy link
Member

Hm. This works for me when I build and read the book locally, but when I try to use one of the "play" buttons on any page on http://rust-lang.github.io/book/second-edition, the Running... code block appears but I don't see any ajax requests to the playground happening, nor does Running... ever change to any output. Not sure what's going on....

@steveklabnik
Copy link
Member

@carols10cents any specific examples? I just did it for the first one on http://rust-lang.github.io/book/second-edition/ch03-02-data-types.html and it worked for me.

Maybe the playpen was timing out when you tried? I guess you said you did see no ajax request though.

@carols10cents
Copy link
Member

LMAO nevermind. Turns out my privacy badger addon was blocking play.rust-lang.org. If I unblock it, it totally works. So I think this is fixed now!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked upstream Blocked on a change that needs to happen in a different repo first Online only
Projects
None yet
Development

No branches or pull requests

3 participants