mirror of
https://github.com/talwat/lowfi
synced 2025-05-03 19:02:17 +00:00
fix: allow for empty headers
This commit is contained in:
parent
84f386e0eb
commit
768f976e89
@ -92,7 +92,7 @@ impl List {
|
|||||||
|
|
||||||
/// Parses text into a [List].
|
/// Parses text into a [List].
|
||||||
pub fn new(name: &str, text: &str) -> Self {
|
pub fn new(name: &str, text: &str) -> Self {
|
||||||
let lines: Vec<String> = text.trim().lines().map(|x| x.trim().to_owned()).collect();
|
let lines: Vec<String> = text.trim().lines().map(|x| x.trim_end().to_owned()).collect();
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
lines,
|
lines,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user