mirror of
https://github.com/rust-lang/mdBook
synced 2024-12-14 14:52:37 +00:00
Merge pull request #283 from budziq/quick_main
Do not add playpen boilerplate when using quick_main!
This commit is contained in:
commit
7b6836b75e
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue