Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hack in h-geo support #93

Open
wants to merge 4 commits into
base: master
from

Conversation

@kisik21
Copy link

commented Sep 8, 2019

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 that should contain a checkin with h-geo embedded. Should be parsed with latitude and longitude, showing a map in applications like Monocle.

kisik21 added 3 commits Sep 8, 2019
Hack in h-geo support
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.
Forgot a )
I'm not a PHP coder, I'm just a dummy :c
@sknebel

This comment has been minimized.

Copy link

commented Sep 9, 2019

I think this needs extra checks for the cases where there is not a nested object in the geo property, or if that object is malformed?

Add more checks on h-geo
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.
@kisik21

This comment has been minimized.

Copy link
Author

commented Sep 15, 2019

@aaronpk @sknebel I added some more checks. Not sure if I'm using XRay functions correctly tho

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.