Remve redundant org_spaces functions.
Turns out the nom space0/space1 parsers accept tab characters already.
This commit is contained in:
@@ -3,6 +3,7 @@ use nom::bytes::complete::is_not;
|
||||
use nom::bytes::complete::tag;
|
||||
use nom::character::complete::line_ending;
|
||||
use nom::character::complete::space0;
|
||||
use nom::character::complete::space1;
|
||||
use nom::combinator::eof;
|
||||
use nom::combinator::not;
|
||||
use nom::combinator::recognize;
|
||||
@@ -12,8 +13,6 @@ use nom::sequence::tuple;
|
||||
|
||||
use super::org_source::OrgSource;
|
||||
use super::util::org_line_ending;
|
||||
use super::util::org_spaces0;
|
||||
use super::util::org_spaces1;
|
||||
use crate::context::parser_with_context;
|
||||
use crate::context::RefContext;
|
||||
use crate::error::Res;
|
||||
@@ -51,7 +50,7 @@ fn fixed_width_area_line<'b, 'g, 'r, 's>(
|
||||
let (remaining, _indent) = space0(input)?;
|
||||
let (remaining, _) = tuple((
|
||||
tag(":"),
|
||||
alt((recognize(tuple((org_spaces1, is_not("\r\n")))), org_spaces0)),
|
||||
alt((recognize(tuple((space1, is_not("\r\n")))), space0)),
|
||||
org_line_ending,
|
||||
))(remaining)?;
|
||||
let source = get_consumed(input, remaining);
|
||||
|
||||
Reference in New Issue
Block a user