Consume line endings at the end of table rows.
This commit is contained in:
parent
f0d2754955
commit
a63d38e0ce
@ -3,6 +3,7 @@ use nom::bytes::complete::is_not;
|
|||||||
use nom::bytes::complete::tag;
|
use nom::bytes::complete::tag;
|
||||||
use nom::character::complete::line_ending;
|
use nom::character::complete::line_ending;
|
||||||
use nom::character::complete::space0;
|
use nom::character::complete::space0;
|
||||||
|
use nom::combinator::eof;
|
||||||
use nom::combinator::not;
|
use nom::combinator::not;
|
||||||
use nom::combinator::peek;
|
use nom::combinator::peek;
|
||||||
use nom::combinator::recognize;
|
use nom::combinator::recognize;
|
||||||
@ -99,6 +100,7 @@ pub fn org_mode_table_row_regular<'r, 's>(
|
|||||||
let (remaining, _) = tuple((space0, tag("|")))(input)?;
|
let (remaining, _) = tuple((space0, tag("|")))(input)?;
|
||||||
let (remaining, children) =
|
let (remaining, children) =
|
||||||
many1(parser_with_context!(org_mode_table_cell)(context))(remaining)?;
|
many1(parser_with_context!(org_mode_table_cell)(context))(remaining)?;
|
||||||
|
let (remaining, _tail) = recognize(tuple((space0, alt((line_ending, eof)))))(remaining)?;
|
||||||
let source = get_consumed(input, remaining);
|
let source = get_consumed(input, remaining);
|
||||||
Ok((remaining, TableRow { source, children }))
|
Ok((remaining, TableRow { source, children }))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user