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"))]
|
||||
fn example_switches<'s>(input: OrgSource<'s>) -> Res<OrgSource<'s>, ExampleSwitches<'s>> {
|
||||
let mut number_lines = None;
|
||||
let (remaining, (source, words)) = consumed(separated_list1(
|
||||
let (remaining, (source, (words, _))) = consumed(tuple((
|
||||
separated_list1(
|
||||
space1,
|
||||
map(is_not(" \t\r\n"), |val| Into::<&str>::into(val)),
|
||||
))(input)?;
|
||||
),
|
||||
space0,
|
||||
)))(input)?;
|
||||
|
||||
let mut state = SwitchState::Normal;
|
||||
for word in words {
|
||||
|
Loading…
Reference in New Issue
Block a user