Since we can't immediately tell if #file-foo-bar-php meant foo.bar.php or foo-bar.php, we do an API call for the whole Gist which lists all the files. We loop through the files, and take the first one that matches our oembed URL suffix when sanitized.
At the moment, this extra API call is NOT cached at all.
Since we can't immediately tell if
#file-foo-bar-php
meantfoo.bar.php
orfoo-bar.php
, we do an API call for the whole Gist which lists all the files. We loop through the files, and take the first one that matches our oembed URL suffix when sanitized.At the moment, this extra API call is NOT cached at all.