HtmlToMarkdown.LinkMetadata (html_to_markdown v3.6.0-rc.23)

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");

Summary

Types

t()

Hyperlink metadata with categorization and attributes.

Types

t()

@type t() :: %HtmlToMarkdown.LinkMetadata{
  attributes: map(),
  href: String.t() | nil,
  link_type: String.t() | nil,
  rel: [String.t()],
  text: String.t() | nil,
  title: String.t() | nil
}

Hyperlink metadata with categorization and attributes.