Skip to content

Commit

Permalink
test: Check that fenced URLs are not converted to anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
nesium committed Aug 26, 2024
1 parent 3910535 commit 2d173b9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions crates/prose-markup/tests/styling_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,16 @@ fn test_plain_text() {
assert_eq!("Hello World", parser.convert_to_message_styling());
assert_eq!("<p>Hello World</p>", parser.convert_to_html());
}

#[test]
fn test_fenced_url_is_not_converted_to_anchor() {
let parser = MarkdownParser::new("`https://www.example.com`");
assert_eq!(
"`https://www.example.com`",
parser.convert_to_message_styling()
);
assert_eq!(
"<p><code>https://www.example.com</code></p>",
parser.convert_to_html()
);
}

0 comments on commit 2d173b9

Please sign in to comment.