From 3e26df844ba232ae7d881ea30720c5e5fd0ddaf8 Mon Sep 17 00:00:00 2001 From: Moises Macia Date: Mon, 6 Jul 2026 22:56:39 +0000 Subject: [PATCH] add docs --- lib/feed_reader.ex | 4 ++-- lib/feed_reader/collector.ex | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/feed_reader.ex b/lib/feed_reader.ex index b23d97a..e912389 100644 --- a/lib/feed_reader.ex +++ b/lib/feed_reader.ex @@ -286,8 +286,8 @@ defmodule FeedReader do @doc """ Collects a caller-owned local XML file into a bounded parse result. - The parser continues through the end of the source so malformed tails are - reported. An item accepted beyond the limit returns + The parser stops after the feed's root element, ignoring content appended + after a complete feed. An item accepted beyond the limit returns `{:error, {:max_items_exceeded, max_items}}` without partial data. ## Options diff --git a/lib/feed_reader/collector.ex b/lib/feed_reader/collector.ex index 9b36f60..65ed21d 100644 --- a/lib/feed_reader/collector.ex +++ b/lib/feed_reader/collector.ex @@ -5,8 +5,8 @@ defmodule FeedReader.Collector do The collector consumes the event stream produced by `FeedReader.Parser` and returns a `FeedReader.ParseResult`. Callers must provide a positive integer `:max_items`; accepted items beyond that limit produce an error instead of a - partial result. The parser continues through its terminal event so malformed - tails are not hidden by the collection limit. + partial result. The parser stops after the feed's root element, so content + appended after a complete feed is not parsed. Binary and chunk-enumerable inputs are written incrementally to a temporary file before parsing. The temporary file is owned and removed by the collector;