fix(style): fix removing newlines
This commit is contained in:
parent
a6c8739044
commit
0dd24e2ba4
24
CHANGELOG.md
24
CHANGELOG.md
@ -5,6 +5,30 @@ The format is based on [Keep a
|
|||||||
Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
|
Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
|
||||||
[Semantic Versioning](https://semver.org/lang/en/).
|
[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
|
## [0.4.1] - 2026-03-26
|
||||||
### Fixed
|
### Fixed
|
||||||
- Added support for rendering individual files, not just directories (e.g.,
|
- Added support for rendering individual files, not just directories (e.g.,
|
||||||
|
|||||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -982,7 +982,7 @@ checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mdpreview"
|
name = "mdpreview"
|
||||||
version = "0.4.3"
|
version = "0.4.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"askama",
|
"askama",
|
||||||
"askama_axum",
|
"askama_axum",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "mdpreview"
|
name = "mdpreview"
|
||||||
version = "0.4.3"
|
version = "0.4.4"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
authors = ["Vladislav Kan <thek4n@yandex.ru>"]
|
authors = ["Vladislav Kan <thek4n@yandex.ru>"]
|
||||||
|
|
||||||
|
|||||||
@ -127,10 +127,13 @@ pub fn markdown_to_html(markdown: &str, ss: &SyntaxSet, ts: &ThemeSet, _file_pat
|
|||||||
IncludeBackground::No,
|
IncludeBackground::No,
|
||||||
)
|
)
|
||||||
.unwrap_or_else(|_| escape_html(&line));
|
.unwrap_or_else(|_| escape_html(&line));
|
||||||
|
|
||||||
result_html.push_str(&html_line);
|
result_html.push_str(&html_line);
|
||||||
|
result_html.push('\n');
|
||||||
}
|
}
|
||||||
Err(_) => {
|
Err(_) => {
|
||||||
result_html.push_str(&escape_html(&line));
|
result_html.push_str(&escape_html(&line));
|
||||||
|
result_html.push('\n');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user