Skip to content

Commit

Permalink
Split on the correct thing; <br>s don't appear much
Browse files Browse the repository at this point in the history
  • Loading branch information
itsjunetime committed Dec 11, 2023
1 parent da9e6bd commit 15d0552
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/home.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl RenderOnce for Posts {
}
div(class = "post-content") : Raw(
// only do the first 20 lines since it's gonna hide past that
post.html.split("br")
post.html.lines()
.take(20)
.collect::<Vec<&str>>()
.join("br")
Expand Down

0 comments on commit 15d0552

Please sign in to comment.