Updated pukram2html version, no need to add newline at end of block anymore
This commit is contained in:
29
src/main.rs
29
src/main.rs
@@ -472,15 +472,13 @@ fn handle_relative_connection(
|
||||
|
||||
let mut has_text = false;
|
||||
convert_extended(
|
||||
lines
|
||||
.take_while(|line| {
|
||||
let empty = line.trim().is_empty();
|
||||
if !empty {
|
||||
has_text = true;
|
||||
}
|
||||
!empty || !has_text
|
||||
})
|
||||
.chain(std::iter::once(String::new())),
|
||||
lines.take_while(|line| {
|
||||
let empty = line.trim().is_empty();
|
||||
if !empty {
|
||||
has_text = true;
|
||||
}
|
||||
!empty || !has_text
|
||||
}),
|
||||
&mut stream,
|
||||
Settings::default()
|
||||
.with_handler(handle_entry)
|
||||
@@ -539,14 +537,11 @@ fn handle_relative_connection(
|
||||
}
|
||||
}
|
||||
convert_subheader(
|
||||
lines
|
||||
.clone()
|
||||
.take_while(|line| {
|
||||
let empty = line.trim().is_empty();
|
||||
last_empty = empty;
|
||||
empty && !last_empty
|
||||
})
|
||||
.chain(std::iter::once(String::new())),
|
||||
lines.clone().take_while(|line| {
|
||||
let empty = line.trim().is_empty();
|
||||
last_empty = empty;
|
||||
empty && !last_empty
|
||||
}),
|
||||
&mut stream,
|
||||
1,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user