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