Support blank lines for descriptive list with empty value before final list item.
This commit is contained in:
parent
dc5695ec9f
commit
f0a7493a89
@ -9,8 +9,3 @@
|
|||||||
- big gap ::
|
- big gap ::
|
||||||
|
|
||||||
stuff
|
stuff
|
||||||
- empty value with blank non-final ::
|
|
||||||
|
|
||||||
- empty value with blank final ::
|
|
||||||
|
|
||||||
stuff
|
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
- foo ::
|
||||||
|
|
||||||
|
- bar ::
|
||||||
|
|
||||||
|
|
||||||
|
baz
|
@ -187,7 +187,11 @@ fn plain_list_item<'b, 'g, 'r, 's>(
|
|||||||
)(&parser_context))(remaining);
|
)(&parser_context))(remaining);
|
||||||
match maybe_contentless_item {
|
match maybe_contentless_item {
|
||||||
Ok((_rem, _ws)) => {
|
Ok((_rem, _ws)) => {
|
||||||
let (remaining, _trailing_ws) = opt(blank_line)(remaining)?;
|
let (remaining, _trailing_ws) = if context.should_consume_trailing_whitespace() {
|
||||||
|
recognize(many0(blank_line))(remaining)?
|
||||||
|
} else {
|
||||||
|
recognize(opt(blank_line))(remaining)?
|
||||||
|
};
|
||||||
let source = get_consumed(input, remaining);
|
let source = get_consumed(input, remaining);
|
||||||
return Ok((
|
return Ok((
|
||||||
remaining,
|
remaining,
|
||||||
@ -245,6 +249,7 @@ fn plain_list_item<'b, 'g, 'r, 's>(
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
enum BulletType {
|
enum BulletType {
|
||||||
Ordered,
|
Ordered,
|
||||||
Unordered,
|
Unordered,
|
||||||
|
Loading…
Reference in New Issue
Block a user