Fix 0ffd638 with smarter way to join with linebreaks.

This commit is contained in:
asolove 2015-12-27 14:24:42 -07:00
parent 0ffd638904
commit 5b289c1303
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ impl Renderer for HtmlHandlebars {
// This could cause a problem when someone displays code containing <base href=...>
// on the front page, however this case should be very very rare...
content = content.lines().filter(|line| !line.contains("<base href=")).map(|line| line.to_string() + "\n").collect();
content = content.lines().filter(|line| !line.contains("<base href=")).collect::<Vec<&str>>().join("\n");
try!(index_file.write_all(content.as_bytes()));