mirror of
https://github.com/rust-lang/mdBook
synced 2024-12-14 23:02:34 +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") {
|
if classes.contains("language-rust") && !classes.contains("ignore") {
|
||||||
// wrap the contents in an external pre block
|
// 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)
|
format!("<pre class=\"playpen\">{}</pre>", text)
|
||||||
} else {
|
} else {
|
||||||
// we need to inject our own main
|
// we need to inject our own main
|
||||||
|
|
Loading…
Reference in a new issue