this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix

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