Current section

Files

Jump to
html_to_markdown lib html_to_markdown table_grid.ex
Raw

lib/html_to_markdown/table_grid.ex

# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:3438f9fbb970f773f3c45f0a76ef480a632b0dfc5f03c8dc6bcca0e4f2e5e5f9
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
defmodule HtmlToMarkdown.TableGrid do
@moduledoc "A structured table grid with cell-level data including spans."
@typedoc "A structured table grid with cell-level data including spans."
@type t :: %__MODULE__{
rows: non_neg_integer(),
cols: non_neg_integer(),
cells: [map()]
}
defstruct rows: 0,
cols: 0,
cells: []
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