Implement the export snippet parser.
This commit is contained in:
@@ -6,10 +6,10 @@ use nom::character::complete::line_ending;
|
||||
use nom::character::complete::none_of;
|
||||
use nom::character::complete::one_of;
|
||||
use nom::character::complete::space0;
|
||||
use nom::combinator::opt;
|
||||
use nom::combinator::peek;
|
||||
use nom::combinator::recognize;
|
||||
use nom::combinator::verify;
|
||||
use nom::multi::many0;
|
||||
use nom::multi::many_till;
|
||||
use nom::sequence::tuple;
|
||||
|
||||
@@ -45,7 +45,7 @@ pub fn latex_fragment<'r, 's>(
|
||||
fn raw_latex_fragment<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, &'s str> {
|
||||
let (remaining, _) = tag("\\")(input)?;
|
||||
let (remaining, _) = name(context, remaining)?;
|
||||
let (remaining, _) = opt(parser_with_context!(brackets)(context))(remaining)?;
|
||||
let (remaining, _) = many0(parser_with_context!(brackets)(context))(remaining)?;
|
||||
|
||||
let source = get_consumed(input, remaining);
|
||||
Ok((remaining, source))
|
||||
|
||||
Reference in New Issue
Block a user