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
This commit is contained in:
Michał Budzyński 2017-05-17 22:24:08 +02:00 committed by Michal Budzynski
parent 0443f8a709
commit c99ce06370
1 changed files with 1 additions and 1 deletions

View File

@ -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!("<pre class=\"playpen\">{}</pre>", text)
} else {
// we need to inject our own main