Current section

Files

Jump to
html_to_markdown lib html_to_markdown conversion_options_update.ex
Raw

lib/html_to_markdown/conversion_options_update.ex

# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:e19f5e250479865621565e32ea53c3202125b83874ff092ae603c0e3a3069a19
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
# Issues & docs: https://github.com/sample_crate-dev/alef
defmodule HtmlToMarkdown.ConversionOptionsUpdate do
@moduledoc """
Partial update for `ConversionOptions`.
Uses `Option<T>` fields for selective updates. Bindings use this to construct
options from language-native types. Prefer [`ConversionOptionsBuilder`] for Rust code.
"""
@typedoc "Partial update for `ConversionOptions`."
@type t :: %__MODULE__{
heading_style: String.t() | nil | nil,
list_indent_type: String.t() | nil | nil,
list_indent_width: non_neg_integer() | nil,
bullets: String.t() | nil,
strong_em_symbol: String.t() | nil,
escape_asterisks: boolean() | nil,
escape_underscores: boolean() | nil,
escape_misc: boolean() | nil,
escape_ascii: boolean() | nil,
code_language: String.t() | nil,
autolinks: boolean() | nil,
default_title: boolean() | nil,
br_in_tables: boolean() | nil,
compact_tables: boolean() | nil,
highlight_style: String.t() | nil | nil,
extract_metadata: boolean() | nil,
whitespace_mode: String.t() | nil | nil,
strip_newlines: boolean() | nil,
wrap: boolean() | nil,
wrap_width: non_neg_integer() | nil,
convert_as_inline: boolean() | nil,
sub_symbol: String.t() | nil,
sup_symbol: String.t() | nil,
newline_style: String.t() | nil | nil,
code_block_style: String.t() | nil | nil,
keep_inline_images_in: [String.t()] | nil,
preprocessing: map() | nil,
encoding: String.t() | nil,
debug: boolean() | nil,
strip_tags: [String.t()] | nil,
preserve_tags: [String.t()] | nil,
skip_images: boolean() | nil,
link_style: String.t() | nil | nil,
output_format: String.t() | nil | nil,
include_document_structure: boolean() | nil,
extract_images: boolean() | nil,
max_image_size: non_neg_integer() | nil,
capture_svg: boolean() | nil,
infer_dimensions: boolean() | nil,
max_depth: non_neg_integer() | nil,
exclude_selectors: [String.t()] | nil,
visitor: reference() | nil
}
defstruct heading_style: nil,
list_indent_type: nil,
list_indent_width: nil,
bullets: nil,
strong_em_symbol: nil,
escape_asterisks: nil,
escape_underscores: nil,
escape_misc: nil,
escape_ascii: nil,
code_language: nil,
autolinks: nil,
default_title: nil,
br_in_tables: nil,
compact_tables: nil,
highlight_style: nil,
extract_metadata: nil,
whitespace_mode: nil,
strip_newlines: nil,
wrap: nil,
wrap_width: nil,
convert_as_inline: nil,
sub_symbol: nil,
sup_symbol: nil,
newline_style: nil,
code_block_style: nil,
keep_inline_images_in: nil,
preprocessing: nil,
encoding: nil,
debug: nil,
strip_tags: nil,
preserve_tags: nil,
skip_images: nil,
link_style: nil,
output_format: nil,
include_document_structure: nil,
extract_images: nil,
max_image_size: nil,
capture_svg: nil,
infer_dimensions: nil,
max_depth: nil,
exclude_selectors: nil,
visitor: nil
defimpl Jason.Encoder do
@doc false
def encode(value, opts) do
value
|> Map.from_struct()
|> Enum.reject(fn {_k, v} -> v == nil end)
|> Enum.into(%{})
|> Jason.Encoder.encode(opts)
end
end
end