rustrogueliketutorial icon indicating copy to clipboard operation
rustrogueliketutorial copied to clipboard

Copy code funtion always includes fn main

Open DominicD opened this issue 5 years ago • 1 comments

Hi,

when I use the copy code button on the code snippets in the tutorial it always includes an fn main. For example Chapter 3 first snippet when I copy I get:


#![allow(unused_variables)]
fn main() {
/// Makes a map with solid boundaries and 400 randomly placed walls. No guarantees that it won't
/// look awful.
pub fn new_map_test() -> Vec<TileType> {
    ...
}
}

DominicD avatar Oct 18 '19 13:10 DominicD

Unfortunately, this is a problem with mdbook - the tool I use to build the HTML from Markdown. The bug is listed here, but I'm not sure what the status is: https://github.com/rust-lang-nursery/mdBook/issues/712

thebracket avatar Oct 18 '19 15:10 thebracket