Merge pull request #744 from eminence/noplaypen_class

Add a "noplaypen" class for rust code samples.
This commit is contained in:
Matt Ickstadt 2018-07-28 19:18:30 -05:00 committed by GitHub
commit d87e77edd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -580,7 +580,9 @@ fn add_playpen_pre(html: &str, playpen_config: &Playpen) -> String {
let classes = &caps[2];
let code = &caps[3];
if (classes.contains("language-rust") && !classes.contains("ignore"))
if (classes.contains("language-rust")
&& !classes.contains("ignore")
&& !classes.contains("noplaypen"))
|| classes.contains("mdbook-runnable")
{
// wrap the contents in an external pre block