Fix RDF.PrefixMap.normalize/1
This commit is contained in:
parent
4f71d14377
commit
86ca2a866c
1 changed files with 3 additions and 3 deletions
|
@ -34,12 +34,12 @@ defmodule RDF.PrefixMap do
|
|||
defp normalize({prefix, %IRI{} = namespace}) when is_atom(prefix),
|
||||
do: {prefix, namespace}
|
||||
|
||||
defp normalize({prefix, namespace}) when is_atom(prefix),
|
||||
do: normalize({prefix, IRI.new(namespace)})
|
||||
|
||||
defp normalize({prefix, namespace}) when is_binary(prefix),
|
||||
do: normalize({String.to_atom(prefix), namespace})
|
||||
|
||||
defp normalize({prefix, namespace}) when is_binary(namespace),
|
||||
do: normalize({prefix, IRI.new(namespace)})
|
||||
|
||||
defp normalize({prefix, _}),
|
||||
do: raise("Invalid prefix on PrefixMap: #{inspect(prefix)}}")
|
||||
|
||||
|
|
Loading…
Reference in a new issue