Merge pull request #283 from budziq/quick_main

Do not add playpen boilerplate when using quick_main!
This commit is contained in:
Mathieu David 2017-05-18 09:29:57 +02:00 committed by GitHub
commit 7b6836b75e

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