Current section

Files

Jump to
html_to_markdown lib html_to_markdown processing_warning.ex
Raw

lib/html_to_markdown/processing_warning.ex

# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:9d115071638507550e36d6a14df4a0d14b3a1af063c48fdb79381da5c9f158da
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
defmodule HtmlToMarkdown.ProcessingWarning do
@moduledoc """
A non-fatal diagnostic produced during HTML conversion.
Warnings indicate that conversion completed but some content may have been handled
differently than expected — for example, an image that could not be extracted, a truncated
input, or malformed HTML that was repaired with best-effort parsing.
Conversion always succeeds (returns `ConversionResult`) even when warnings are
present. Callers should inspect `warnings` and decide how to
handle them based on their tolerance for partial results:
- **Logging pipelines**: emit each warning at `WARN` level and continue.
- **Strict pipelines**: treat any warning as a hard error by checking
`result.warnings.is_empty()` before using the output.
See [`WarningKind`] for the full taxonomy of warning categories.
"""
@typedoc "A non-fatal diagnostic produced during HTML conversion."
@type t :: %__MODULE__{
message: String.t() | nil,
kind: String.t() | nil
}
defstruct message: nil,
kind: :image_extraction_failed
end