fix(style): fix removing newlines

This commit is contained in:
thek4n 2026-03-29 12:03:01 +03:00
parent a6c8739044
commit 0dd24e2ba4
4 changed files with 29 additions and 2 deletions

View File

@ -5,6 +5,30 @@ The format is based on [Keep a
Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
[Semantic Versioning](https://semver.org/lang/en/).
## [0.4.4] - 2026-03-29
### Fixed
- Fixed removing newlines.
---
## [0.4.3] - 2026-03-28
### Changed
- Change footer.
---
## [0.4.2] - 2026-03-27
### Added
- Added version and project name in footer.
---
## [0.4.1] - 2026-03-26
### Fixed
- Added support for rendering individual files, not just directories (e.g.,

2
Cargo.lock generated
View File

@ -982,7 +982,7 @@ checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94"
[[package]]
name = "mdpreview"
version = "0.4.3"
version = "0.4.4"
dependencies = [
"askama",
"askama_axum",

View File

@ -1,6 +1,6 @@
[package]
name = "mdpreview"
version = "0.4.3"
version = "0.4.4"
edition = "2024"
authors = ["Vladislav Kan <thek4n@yandex.ru>"]

View File

@ -127,10 +127,13 @@ pub fn markdown_to_html(markdown: &str, ss: &SyntaxSet, ts: &ThemeSet, _file_pat
IncludeBackground::No,
)
.unwrap_or_else(|_| escape_html(&line));
result_html.push_str(&html_line);
result_html.push('\n');
}
Err(_) => {
result_html.push_str(&escape_html(&line));
result_html.push('\n');
}
}
}