Current section

Files

Jump to
html_to_markdown lib html_to_markdown node_content.ex
Raw

lib/html_to_markdown/node_content.ex

# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:06a07f59ff322c5fa6ed3766823355b3456bd29753f0289e14bc8234d55bb3e7
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
defmodule HtmlToMarkdown.NodeContent do
@moduledoc """
The semantic content type of a document node.
Uses internally tagged representation (`"node_type": "heading"`) for JSON serialization.
"""
@typedoc "The semantic content type of a document node."
@type t :: term()
@typedoc "A heading element (h1-h6)."
@type heading :: %{type: :heading, level: non_neg_integer(), text: String.t()}
@typedoc "A paragraph of text."
@type paragraph :: %{type: :paragraph, text: String.t()}
@typedoc "A list container (ordered or unordered). Children are `ListItem` nodes."
@type list_variant :: %{type: :list, ordered: boolean()}
@typedoc "A single list item."
@type list_item :: %{type: :list_item, text: String.t()}
@typedoc "A table with structured cell data."
@type table :: %{type: :table, grid: HtmlToMarkdown.TableGrid.t()}
@typedoc "An image element."
@type image :: %{type: :image, description: String.t(), src: String.t(), image_index: non_neg_integer()}
@typedoc "A code block or inline code."
@type code :: %{type: :code, text: String.t(), language: String.t()}
@typedoc "A block quote container."
@type quote :: :quote
@typedoc "A definition list container."
@type definition_list :: :definition_list
@typedoc "A definition list entry with term and description."
@type definition_item :: %{type: :definition_item, term: String.t(), definition: String.t()}
@typedoc "A raw block preserved as-is (e.g. `<script>`, `<style>` content)."
@type raw_block :: %{type: :raw_block, format: String.t(), content: String.t()}
@typedoc "A block of key-value metadata pairs (from `<head>` meta tags)."
@type metadata_block :: %{type: :metadata_block, entries: [map()]}
@typedoc "A section grouping container (auto-generated from heading hierarchy)."
@type group :: %{type: :group, label: String.t(), heading_level: non_neg_integer(), heading_text: String.t()}
end