`strpos(string, sub)` returns `false` if `sub` is not present in `string`. In this case, we want to check if `sub` is not a *prefix* of `string`. Hence, we just need to test if the returned position is simply different from 0.
* looks through the full mf2 tree for step 7 of authorship https://github.com/indieweb/authorship/issues/2
* if no author h-card is found, falls back to returning the author URL without other data instead of missing author
closes#95
if the document contains a link to the target, but that link is not in the parsed result, don't return an error, but also don't return the parsed document
closes#150
To make it possible to consume feeds of pre-rendered Microformats2 JSON
data, we need to be able to discover that it is a Microformats2 JSON
file using the known MIME types documented in
http://microformats.org/wiki/microformats2-mime-type
Now it checks that:
1. h-geo exists
2. it's a microformat
3. it's of type "h-geo"
4. that it has properties
5. that it has latitude
6. that it has longitude
If all checks are true, lat and lon get replaced with values of h-geo object.
This adds h-geo microformat support. It's clunky but it should work. I'm no PHP gal so I hope you have CI or something that would test it.
Test case: [this post by me](https://fireburn.ru/posts/1567956895) that should contain a checkin with h-geo embedded. Should be parsed with latitude and longitude, showing a map in applications like Monocle.
The previous check removed a h-card, but this one still takes the first of the original array. Which means, in the case of `h-card+h-entry`, the h-card get’s removed, but then the if triggers and the `h-card` is selected.
* a single h-entry and h-card, where the h-entry has no URL, will result in a permalink page with that h-entry
* multiple h-entrys followed by an h-card is a feed