Remove line number limit for LaTeX fragments.
This commit is contained in:
parent
16e788c36c
commit
9e0e5f6f0a
@ -202,17 +202,13 @@ fn bordered_dollar_fragment<'r, 's>(
|
|||||||
// TODO: I'm assuming I should be peeking at the borders but the documentation is not clear. Test to figure out.
|
// TODO: I'm assuming I should be peeking at the borders but the documentation is not clear. Test to figure out.
|
||||||
let (_, _) = peek(parser_with_context!(open_border)(context))(remaining)?;
|
let (_, _) = peek(parser_with_context!(open_border)(context))(remaining)?;
|
||||||
|
|
||||||
// TODO: As an optimization it would be nice to exit early upon hitting the 3rd line break
|
let (remaining, _) = recognize(many_till(
|
||||||
let (remaining, _) = verify(
|
anychar,
|
||||||
recognize(many_till(
|
peek(alt((
|
||||||
anychar,
|
parser_with_context!(exit_matcher_parser)(context),
|
||||||
peek(alt((
|
tag("$"),
|
||||||
parser_with_context!(exit_matcher_parser)(context),
|
))),
|
||||||
tag("$"),
|
))(remaining)?;
|
||||||
))),
|
|
||||||
)),
|
|
||||||
|body: &OrgSource<'_>| Into::<&str>::into(body).lines().take(4).count() <= 3,
|
|
||||||
)(remaining)?;
|
|
||||||
|
|
||||||
let (_, _) = peek(parser_with_context!(close_border)(context))(remaining)?;
|
let (_, _) = peek(parser_with_context!(close_border)(context))(remaining)?;
|
||||||
let (remaining, _) = tag("$")(remaining)?;
|
let (remaining, _) = tag("$")(remaining)?;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user