Current section

Files

Jump to
html_to_markdown lib html_to_markdown node_context.ex
Raw

lib/html_to_markdown/node_context.ex

# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:094484387808183514a801bab05d27e52c1d7d3d595e8913feed7cad1498eee3
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
# Issues & docs: https://github.com/kreuzberg-dev/alef
defmodule HtmlToMarkdown.NodeContext do
@moduledoc """
Context information passed to all visitor methods.
Provides comprehensive metadata about the current node being visited,
including its type, attributes, position in the DOM tree, and parent context.
"""
@typedoc "Context information passed to all visitor methods."
@type t :: %__MODULE__{
node_type: String.t() | nil,
tag_name: String.t() | nil,
attributes: map(),
depth: non_neg_integer(),
index_in_parent: non_neg_integer(),
parent_tag: String.t() | nil,
is_inline: boolean()
}
defstruct node_type: :text,
tag_name: nil,
attributes: %{},
depth: 0,
index_in_parent: 0,
parent_tag: nil,
is_inline: false
end