Merge pull request #283 from budziq/quick_main
Do not add playpen boilerplate when using quick_main!
This commit is contained in:
commit
7b6836b75e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue