HtmlToMarkdown. LinkMetadata
(html_to_markdown v3.6.0-rc.16)
Copy Markdown
Hyperlink metadata with categorization and attributes.
Represents <a> elements with parsed href values, text content, and link type classification.
Examples
let link = LinkMetadata {
href: "https://example.com".to_string(),
text: "Example".to_string(),
title: Some("Visit Example".to_string()),
link_type: LinkType::External,
rel: vec!["nofollow".to_string()],
attributes: Default::default(),
};
assert_eq!(link.link_type, LinkType::External);
assert_eq!(link.text, "Example");