Support multiple commas when escaping lines.
This commit is contained in:
parent
d059afef07
commit
da5dcd4c1b
@ -1,6 +1,6 @@
|
|||||||
#+begin_example
|
#+begin_example
|
||||||
,* foo
|
,* foo
|
||||||
,** bar
|
,,,** bar
|
||||||
,*** baz
|
,*** baz
|
||||||
lorem
|
lorem
|
||||||
, ipsum
|
, ipsum
|
||||||
|
@ -476,8 +476,17 @@ fn content_line<'s>(
|
|||||||
input: OrgSource<'s>,
|
input: OrgSource<'s>,
|
||||||
) -> Res<OrgSource<'s>, (Option<OrgSource<'s>>, OrgSource<'s>)> {
|
) -> Res<OrgSource<'s>, (Option<OrgSource<'s>>, OrgSource<'s>)> {
|
||||||
let (remaining, pre_escape_whitespace) = opt(map(
|
let (remaining, pre_escape_whitespace) = opt(map(
|
||||||
tuple((space0, tag(","), peek(alt((tag("#+"), tag("*")))))),
|
tuple((
|
||||||
|(pre_comma, _, _)| pre_comma,
|
recognize(tuple((
|
||||||
|
space0,
|
||||||
|
many_till(
|
||||||
|
tag(","),
|
||||||
|
peek(tuple((tag(","), alt((tag("#+"), tag("*")))))),
|
||||||
|
),
|
||||||
|
))),
|
||||||
|
tag(","),
|
||||||
|
)),
|
||||||
|
|(pre_comma, _)| pre_comma,
|
||||||
))(input)?;
|
))(input)?;
|
||||||
let (remaining, line_post_escape) = recognize(many_till(anychar, line_ending))(remaining)?;
|
let (remaining, line_post_escape) = recognize(many_till(anychar, line_ending))(remaining)?;
|
||||||
Ok((remaining, (pre_escape_whitespace, line_post_escape)))
|
Ok((remaining, (pre_escape_whitespace, line_post_escape)))
|
||||||
|
Loading…
Reference in New Issue
Block a user