add feed formats

This commit is contained in:
mmacia committed 2026-03-13 21:55:05 +00:00
1 parent cf34ebbfff
commit 12310ce2dc
3 files changed
+23

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
defmodule FeedReader.Formats.Atom do
@moduledoc false
def matches_prefix?(prefix), do: Regex.match?(~r/<feed\b/is, prefix)
def id, do: :atom
end
+7
View File
@@ -0,0 +1,7 @@
defmodule FeedReader.Formats.RDF do
@moduledoc false
def matches_prefix?(prefix), do: Regex.match?(~r/<rdf:rdf\b/is, prefix)
def id, do: :rdf
end
+9
View File
@@ -0,0 +1,9 @@
defmodule FeedReader.Formats.RSS do
@moduledoc false
def matches_prefix?(prefix) do
Regex.match?(~r/<rss\b[^>]*\bversion\s*=\s*(["'])2\.0\1/is, prefix)
end
def id, do: :rss
end