My agentic slop goes here. Not intended for anyone else!

fix

Changed files
+5 -6
stack
+4 -6
stack/syndic/lib/syndic_atom.ml
···
))
in
(* atomEntry* *)
-
let fix_author pos (e : entry) =
+
let fix_author _pos (e : entry) =
match e.authors with
| a, [] when a.name = dummy_name -> (
(* In an Atom Feed Document, the atom:author elements of the containing
···
match authors with
| a0 :: a -> {e with authors= (a0, a)}
| [] ->
-
let msg =
-
"<entry> elements MUST contains at least an <author> element or \
-
<feed> element MUST contains one or more <author> elements"
-
in
-
raise (Error.Error (pos, msg)) )
+
(* RFC 4287 requires at least one author, but many real-world feeds
+
omit this. Be lenient and use an empty author rather than failing. *)
+
{e with authors= (empty_author, [])} )
| _ -> e
in
let entries =
+1
stack/syndic/lib/syndic_common.ml
···
let get_leaf l =
match find (function XML.Data _ -> true | _ -> false) l with
| Some (XML.Data (_, s)) -> s
+
| None -> "" (* Return empty string for empty elements instead of raising Not_found *)
| _ -> raise Not_found
let get_attrs ((_, attrs) : XML.tag) = attrs