Skip to content

Commit

Permalink
Readme: strip trailing newlines in code blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed Jan 24, 2025
1 parent c0c59a3 commit e70eda0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/readme/src/markdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ pub(crate) fn markdown_to_html(contents: String) -> String {
&plugins,
);

// Strip trailing newlines in code blocks
let body_html = body_html.replace("\n</code", "</code");

format!(
r#"
<!DOCTYPE html>
Expand Down

0 comments on commit e70eda0

Please sign in to comment.