Skip to content

Commit a3b6e54

Browse files
authored
Merge pull request #440 from budziq/force_runnable
added `mdbook-runnable` infostring support
2 parents d450518 + c056df5 commit a3b6e54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/renderer/html_handlebars/hbs_renderer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ fn add_playpen_pre(html: &str, playpen_config: &PlaypenConfig) -> String {
547547
let classes = &caps[2];
548548
let code = &caps[3];
549549

550-
if classes.contains("language-rust") && !classes.contains("ignore") {
550+
if (classes.contains("language-rust") && !classes.contains("ignore")) || classes.contains("mdbook-runnable") {
551551
// wrap the contents in an external pre block
552552
if playpen_config.is_editable() &&
553553
classes.contains("editable") || text.contains("fn main") || text.contains("quick_main!") {

0 commit comments

Comments
 (0)