iamcal / oembed

The oEmbed Spec
http://oembed.com
MIT License
1.32k stars 644 forks source link

Question about the spec #516

Open raae opened 3 years ago

raae commented 3 years ago

Should it be possible for a url to match several endpoint?

I always assumed that a url would match one of the schema lists per provider, thus resulting in one and only one endpoint match.

This came up as #514 dictates there could be more than one endpoint match for a url, and that the first one should be preferred.

I am asking so I make the correct assumptions for my plugin gatsby-remark-omebed. I will be digging into the plugin again this spring creating a more generic plugin for remark and building on that for other frameworks as well I hope. I am also open to contribute more here as well if needed.

iamcal commented 3 years ago

This is an oversight in the original spec. A reasonable implementation would be to pick the first match.

raae commented 3 years ago

Should it be added to the spec? Should there be a RFC?

Let me know how I can help.