Handle tabs for plain list descriptions.
This bug probably exists in hundreds of places across the code base. I am going to have to write a "fuzzer" that replaces random whitespace with tabs to find them all.
This commit is contained in:
@@ -332,7 +332,7 @@ fn item_tag<'b, 'g, 'r, 's>(
|
||||
),
|
||||
|(children, _exit_contents)| !children.is_empty(),
|
||||
)(input)?;
|
||||
let (remaining, _) = tag(" ::")(remaining)?;
|
||||
let (remaining, _) = tuple((one_of(" \t"), tag("::")))(remaining)?;
|
||||
Ok((remaining, children))
|
||||
}
|
||||
|
||||
@@ -341,9 +341,10 @@ fn item_tag_end<'b, 'g, 'r, 's>(
|
||||
_context: RefContext<'b, 'g, 'r, 's>,
|
||||
input: OrgSource<'s>,
|
||||
) -> Res<OrgSource<'s>, OrgSource<'s>> {
|
||||
recognize(alt((
|
||||
tag(" :: "),
|
||||
recognize(tuple((tag(" ::"), alt((line_ending, eof))))),
|
||||
recognize(tuple((
|
||||
one_of(" \t"),
|
||||
tag("::"),
|
||||
alt((recognize(one_of(" \t")), line_ending, eof)),
|
||||
)))(input)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user