Skip to content

Commit

Permalink
add more test case
Browse files Browse the repository at this point in the history
  • Loading branch information
farooqkz committed May 28, 2024
1 parent 25b0248 commit 0c6d53f
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions tests/text_to_ast/text_only.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,29 @@ fn labelled_hashtag() {
assert_eq!(
parse_only_text(input_bold),
vec![
LaballedTag {
label: vec![Bold(vec![Text(Hello)])],
LabelledTag {
label: vec![Bold(vec![Text("Hello")])],
tag: "#hi",
},
Text(" ")
]
);

let input_bold_and_italic = "Hello this is a [_labeled_ **hashtag**](#tag)";
assert_eq!(
parse_only_text(input_bold_and_italic),
vec![
Text("Hello this is a "),
LabelledTag {
label: vec![
Italics(vec![Text("labeled")]),
Text(" "),
Bold(vec![Text("hashtag")]),
],
tag: "#tag",
}
]
);
}

#[test]
Expand Down

0 comments on commit 0c6d53f

Please sign in to comment.