feat(parser): table blank lines
This commit is contained in:
parent
ead6ea6289
commit
b446471535
10 changed files with 151 additions and 114 deletions
|
|
@ -15,7 +15,10 @@ pub struct FixedWidth<'a> {
|
|||
|
||||
impl FixedWidth<'_> {
|
||||
pub(crate) fn parse(input: &str) -> Option<(&str, FixedWidth<'_>)> {
|
||||
let (input, value) = take_lines_while(|line| line == ":" || line.starts_with(": "))(input);
|
||||
let (input, value) = take_lines_while(|line| {
|
||||
let line = line.trim_start();
|
||||
line == ":" || line.starts_with(": ")
|
||||
})(input);
|
||||
let (input, blank) = blank_lines(input);
|
||||
|
||||
if value.is_empty() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue