Skip to content

Commit

Permalink
fix formatting. now you rustfmt?
Browse files Browse the repository at this point in the history
  • Loading branch information
farooqkz authored and Simon-Laux committed May 7, 2024
1 parent 72a13c7 commit 79a307f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/parser/parse_from_text/text_elements.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ use super::hashtag_content_char_ranges::hashtag_content_char;
use super::Element;
use nom::{
bytes::{
complete::{tag, take, take_while1, take_while},
complete::{tag, take, take_while, take_while1},
streaming::take_till1,
},
character::complete::char,
combinator::{peek, recognize, verify},
sequence::tuple,
AsChar, IResult, Slice, Offset
AsChar, IResult, Offset, Slice,
};

use super::base_parsers::CustomError;
Expand All @@ -21,10 +21,7 @@ fn linebreak(input: &str) -> IResult<&str, char, CustomError<&str>> {
}

fn hashtag(input: &str) -> IResult<&str, Element, CustomError<&str>> {
let (input, content) = recognize(tuple((
char('#'),
take_while1(hashtag_content_char),
)))(input)?;
let (input, content) = recognize(tuple((char('#'), take_while1(hashtag_content_char))))(input)?;

Ok((input, Element::Tag(content)))
}
Expand Down

0 comments on commit 79a307f

Please sign in to comment.