Merge branch 'master' of github.com:azerupi/mdBook
This commit is contained in:
commit
4128a78171
|
@ -36,7 +36,12 @@ pub fn render_playpen(s: &str, path: &Path) -> String {
|
||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
let replacement = String::new() + "<pre><code class=\"language-rust\">" + &file_content + "</code></pre>";
|
let mut editable = "";
|
||||||
|
if playpen.editable {
|
||||||
|
editable = ",editable";
|
||||||
|
}
|
||||||
|
|
||||||
|
let replacement = String::new() + "``` rust" + editable + "\n" + &file_content + "\n```\n";
|
||||||
|
|
||||||
replaced.push_str(&s[previous_end_index..playpen.start_index]);
|
replaced.push_str(&s[previous_end_index..playpen.start_index]);
|
||||||
replaced.push_str(&replacement);
|
replaced.push_str(&replacement);
|
||||||
|
|
Loading…
Reference in New Issue