From c99ce06370262cb576ae33cd735351cddda07074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=85=C2=82=20Budzy=C3=85=C2=84ski?= Date: Wed, 17 May 2017 22:24:08 +0200 Subject: [PATCH] Do not add playpen boilerplate quick_main! is used code snippets using quick_main! macro from error-chain https://docs.rs/error-chain/0.10.0/error_chain/macro.quick_main.html no longer have `fn main` implicitly added --- src/renderer/html_handlebars/hbs_renderer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/html_handlebars/hbs_renderer.rs b/src/renderer/html_handlebars/hbs_renderer.rs index e9250a3d..6ecd9e17 100644 --- a/src/renderer/html_handlebars/hbs_renderer.rs +++ b/src/renderer/html_handlebars/hbs_renderer.rs @@ -319,7 +319,7 @@ fn add_playpen_pre(html: String) -> String { if classes.contains("language-rust") && !classes.contains("ignore") { // wrap the contents in an external pre block - if text.contains("fn main") { + if text.contains("fn main") || text.contains("quick_main!") { format!("
{}
", text) } else { // we need to inject our own main