HtmlToMarkdown.Options (html_to_markdown v2.22.5)

View Source

High-level configuration for HTML → Markdown conversion.

Use new/1 to build options from a map or keyword list, or construct the struct directly. Pass the struct to HtmlToMarkdown.convert/2, HtmlToMarkdown.options/1, or HtmlToMarkdown.convert_with_inline_images/3.

Summary

Functions

Build options from a struct, keyword list, or map.

Types

code_block_style()

@type code_block_style() :: :indented | :backticks | :tildes

heading_style()

@type heading_style() :: :underlined | :atx | :atx_closed

highlight_style()

@type highlight_style() :: :double_equal | :html | :bold | :none

list_indent_type()

@type list_indent_type() :: :spaces | :tabs

newline_style()

@type newline_style() :: :spaces | :backslash

t()

@type t() :: %HtmlToMarkdown.Options{
  autolinks: boolean(),
  br_in_tables: boolean(),
  bullets: String.t(),
  code_block_style: code_block_style(),
  code_language: String.t(),
  convert_as_inline: boolean(),
  debug: boolean(),
  default_title: boolean(),
  encoding: String.t(),
  escape_ascii: boolean(),
  escape_asterisks: boolean(),
  escape_misc: boolean(),
  escape_underscores: boolean(),
  extract_metadata: boolean(),
  heading_style: heading_style(),
  highlight_style: highlight_style(),
  hocr_spatial_tables: boolean(),
  keep_inline_images_in: MapSet.t(),
  list_indent_type: list_indent_type(),
  list_indent_width: pos_integer(),
  newline_style: newline_style(),
  preprocessing: HtmlToMarkdown.PreprocessingOptions.t(),
  preserve_tags: MapSet.t(),
  skip_images: boolean(),
  strip_newlines: boolean(),
  strip_tags: MapSet.t(),
  strong_em_symbol: String.t(),
  sub_symbol: String.t(),
  sup_symbol: String.t(),
  whitespace_mode: whitespace_mode(),
  wrap: boolean(),
  wrap_width: pos_integer()
}

whitespace_mode()

@type whitespace_mode() :: :normalized | :strict

Functions

new(opts)

@spec new(t() | map() | keyword() | nil) :: t()

Build options from a struct, keyword list, or map.