added `mdbook-runnable` infostring support
makes `ignore`'d playpens runnable
This commit is contained in:
parent
0226da91e4
commit
c056df597a
|
@ -546,7 +546,7 @@ fn add_playpen_pre(html: &str, playpen_config: &PlaypenConfig) -> String {
|
||||||
let classes = &caps[2];
|
let classes = &caps[2];
|
||||||
let code = &caps[3];
|
let code = &caps[3];
|
||||||
|
|
||||||
if classes.contains("language-rust") && !classes.contains("ignore") {
|
if (classes.contains("language-rust") && !classes.contains("ignore")) || classes.contains("mdbook-runnable") {
|
||||||
// wrap the contents in an external pre block
|
// wrap the contents in an external pre block
|
||||||
if playpen_config.is_editable() &&
|
if playpen_config.is_editable() &&
|
||||||
classes.contains("editable") || text.contains("fn main") || text.contains("quick_main!") {
|
classes.contains("editable") || text.contains("fn main") || text.contains("quick_main!") {
|
||||||
|
|
Loading…
Reference in New Issue