Cleanup
This commit is contained in:
parent
4ac3a47deb
commit
6404e5f50e
@ -1,23 +1,12 @@
|
|||||||
//! A single element of text.
|
//! A single element of text.
|
||||||
use super::bold::bold;
|
|
||||||
use super::combinator::context_many1;
|
use super::combinator::context_many1;
|
||||||
use super::error::Res;
|
use super::error::Res;
|
||||||
use super::link::link;
|
|
||||||
use super::paragraph::paragraph;
|
use super::paragraph::paragraph;
|
||||||
use super::parser_context::ContextElement;
|
use super::parser_context::ContextElement;
|
||||||
use super::parser_context::ContextTree;
|
use super::parser_context::ContextTree;
|
||||||
use super::text::line_break;
|
|
||||||
use super::text::space;
|
|
||||||
use super::text::span;
|
|
||||||
use super::text::symbol;
|
|
||||||
use super::text::Paragraph;
|
use super::text::Paragraph;
|
||||||
use super::text::TextElement;
|
|
||||||
use super::token::Token;
|
use super::token::Token;
|
||||||
use super::Context;
|
use super::Context;
|
||||||
use crate::parser::parser_with_context::parser_with_context;
|
|
||||||
use nom::branch::alt;
|
|
||||||
use nom::combinator::map;
|
|
||||||
use nom::combinator::not;
|
|
||||||
use nom::IResult;
|
use nom::IResult;
|
||||||
|
|
||||||
type UnboundMatcher<'r, 's, I, O, E> = dyn Fn(Context<'r, 's>, I) -> IResult<I, O, E>;
|
type UnboundMatcher<'r, 's, I, O, E> = dyn Fn(Context<'r, 's>, I) -> IResult<I, O, E>;
|
||||||
|
@ -74,11 +74,11 @@ pub fn line_break(input: &str) -> Res<&str, LineBreak> {
|
|||||||
map(line_ending, |s: &str| LineBreak { contents: s })(input)
|
map(line_ending, |s: &str| LineBreak { contents: s })(input)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn space(input: &str) -> Res<&str, Space> {
|
fn space(input: &str) -> Res<&str, Space> {
|
||||||
map(space1, |s: &str| Space { contents: s })(input)
|
map(space1, |s: &str| Space { contents: s })(input)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn span(input: &str) -> Res<&str, Span> {
|
fn span(input: &str) -> Res<&str, Span> {
|
||||||
map(alphanumeric1, |s: &str| Span { contents: s })(input)
|
map(alphanumeric1, |s: &str| Span { contents: s })(input)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user