A Oembed consumer library, that gives you information about urls. It helps you replace urls to youtube or vimeo for example, with their html embed code. It has advanced features like offline support, responsive embeds and caching support.
First of all, thanks for this lib. Its awesome! :)
But I think I found a minor limitation when it comes to Github Gists urls.
The problem is that the current version of Embera doesn't support all gists url variations, I'm afraid of.
If we check both the test file TestServiceGithubGist.php and the service provider code GithubGist.php, its clear that the support covers the following url pattern:
github\.com\/(?:[^\/]+)\/([\d]+)\/?
which basically translates to:
github.com/<GIST-OWNER-USERNAME>/<GIST-ID>
The issue comes when we have a gist whose its GIST-ID consist in an alpha-numeric value, not only numeric values, defined by the [\d]+ rule.
I.e, where both cases should be considered as valid ("good"):
good url: https://gist.github.com/mpratt/5671743
bad url: https://gist.github.com/deenison/1924c23f27fe27fe7da68375d71c5ae8
So, wouldn't be better if we change that numeric rule to [a-z0-9]+ (already using case-insensitive flag)?
First of all, thanks for this lib. Its awesome! :)
But I think I found a minor limitation when it comes to Github Gists urls. The problem is that the current version of Embera doesn't support all gists url variations, I'm afraid of.
If we check both the test file
TestServiceGithubGist.php
and the service provider codeGithubGist.php
, its clear that the support covers the following url pattern:github\.com\/(?:[^\/]+)\/([\d]+)\/?
which basically translates to:
github.com/<GIST-OWNER-USERNAME>/<GIST-ID>
The issue comes when we have a gist whose its
GIST-ID
consist in an alpha-numeric value, not only numeric values, defined by the[\d]+
rule.I.e, where both cases should be considered as valid ("good"):
https://gist.github.com/mpratt/5671743
https://gist.github.com/deenison/1924c23f27fe27fe7da68375d71c5ae8
So, wouldn't be better if we change that numeric rule to
[a-z0-9]+
(already using case-insensitive flag)?Regards.