Fix capturing trailing whitespace for switches.
This commit is contained in:
parent
317293f0f2
commit
03028889bd
@ -328,10 +328,13 @@ enum SwitchState {
|
|||||||
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
|
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
|
||||||
fn example_switches<'s>(input: OrgSource<'s>) -> Res<OrgSource<'s>, ExampleSwitches<'s>> {
|
fn example_switches<'s>(input: OrgSource<'s>) -> Res<OrgSource<'s>, ExampleSwitches<'s>> {
|
||||||
let mut number_lines = None;
|
let mut number_lines = None;
|
||||||
let (remaining, (source, words)) = consumed(separated_list1(
|
let (remaining, (source, (words, _))) = consumed(tuple((
|
||||||
space1,
|
separated_list1(
|
||||||
map(is_not(" \t\r\n"), |val| Into::<&str>::into(val)),
|
space1,
|
||||||
))(input)?;
|
map(is_not(" \t\r\n"), |val| Into::<&str>::into(val)),
|
||||||
|
),
|
||||||
|
space0,
|
||||||
|
)))(input)?;
|
||||||
|
|
||||||
let mut state = SwitchState::Normal;
|
let mut state = SwitchState::Normal;
|
||||||
for word in words {
|
for word in words {
|
||||||
|
Loading…
Reference in New Issue
Block a user