This commit is contained in:
Tom Alexander 2022-12-18 03:14:56 -05:00
parent 4ac3a47deb
commit 6404e5f50e
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 2 additions and 13 deletions

View File

@ -1,23 +1,12 @@
//! A single element of text.
use super::bold::bold;
use super::combinator::context_many1;
use super::error::Res;
use super::link::link;
use super::paragraph::paragraph;
use super::parser_context::ContextElement;
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::TextElement;
use super::token::Token;
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;
type UnboundMatcher<'r, 's, I, O, E> = dyn Fn(Context<'r, 's>, I) -> IResult<I, O, E>;

View File

@ -74,11 +74,11 @@ pub fn line_break(input: &str) -> Res<&str, LineBreak> {
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)
}
pub fn span(input: &str) -> Res<&str, Span> {
fn span(input: &str) -> Res<&str, Span> {
map(alphanumeric1, |s: &str| Span { contents: s })(input)
}