Fix handling fixed width area post-blank inside a list.
This commit is contained in:
@@ -14,7 +14,7 @@ use nom::InputTake;
|
||||
|
||||
use super::affiliated_keyword::parse_affiliated_keywords;
|
||||
use super::org_source::OrgSource;
|
||||
use super::util::maybe_consume_trailing_whitespace_if_not_exiting_mid_line;
|
||||
use super::util::maybe_consume_trailing_whitespace_if_not_exiting;
|
||||
use super::util::org_line_ending;
|
||||
use crate::context::parser_with_context;
|
||||
use crate::context::RefContext;
|
||||
@@ -48,8 +48,11 @@ where
|
||||
),
|
||||
))(remaining)?;
|
||||
|
||||
let (remaining, post_blank) =
|
||||
maybe_consume_trailing_whitespace_if_not_exiting_mid_line(context, remaining)?;
|
||||
let post_blank_begin = remaining;
|
||||
let (remaining, _first_line_break) = org_line_ending(remaining)?;
|
||||
let (remaining, _additional_post_blank) =
|
||||
maybe_consume_trailing_whitespace_if_not_exiting(context, remaining)?;
|
||||
let post_blank = get_consumed(post_blank_begin, remaining);
|
||||
let source = get_consumed(input, remaining);
|
||||
let mut value = Vec::with_capacity(remaining_lines.len() + 1);
|
||||
value.push(Into::<&str>::into(first_line));
|
||||
@@ -63,7 +66,11 @@ where
|
||||
affiliated_keywords,
|
||||
),
|
||||
value,
|
||||
post_blank: post_blank.map(Into::<&str>::into),
|
||||
post_blank: if post_blank.len() > 0 {
|
||||
Some(Into::<&str>::into(post_blank))
|
||||
} else {
|
||||
None
|
||||
},
|
||||
},
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user