HtmlToMarkdown.UrlEscapeStyle (html_to_markdown v3.6.0-rc.9)

Copy Markdown

URL encoding strategy for link and image destinations.

Controls how special characters in URL destinations are handled when they require escaping to produce valid Markdown.

The Angle variant (default) wraps the destination in angle brackets: [text](<url with spaces>). This is the CommonMark-specified escape hatch but breaks when the URL itself contains >.

The Percent variant percent-encodes every character that is not an RFC 3986 unreserved character or /, producing a destination safe for all Markdown parsers: [text](url%20with%20spaces).

Summary

Types

t()

URL encoding strategy for link and image destinations.

Functions

Wrap destinations that contain spaces or newlines in angle brackets. Default.

Percent-encode all characters that are not RFC 3986 unreserved or /.

Types

t()

@type t() :: :angle | :percent

URL encoding strategy for link and image destinations.

Functions

angle()

@spec angle() :: t()

Wrap destinations that contain spaces or newlines in angle brackets. Default.

percent()

@spec percent() :: t()

Percent-encode all characters that are not RFC 3986 unreserved or /.