#microformats 2020-04-22
2020-04-22 UTC
[schmarty], KartikPrabhu, Bill_Bennett_NZ and [jgarber] joined the channel
mauz555, [tantek], [jgmac1106], kino, [chrisaldrich] and GWG joined the channel
# gRegorLove [jgarber] I don't think the only-domain URLs are supposed to be normalized adding the trailing slash like that. Otherwise tests/112 looks good!
strugee joined the channel
# Zegnat It is hard to say what normalisation is supposed or not supposed to happen. I think we still do not define what a “normalized absolute URL” is, as the spec always calls it. I think it is not weird for libraries to require some value for path, which at minimum is the /. (Ie. it is not a “trailing slash”, it is “root path”.)
# Zegnat Might be time to pick up this discussion about normalisation again: https://github.com/microformats/microformats2-parsing/issues/9#issuecomment-383051432
KartikPrabhu, [LewisCowles], mauz555, [jgmac1106], gRegorLove_, [tw2113] and [jgarber] joined the channel
# [jgarber] ```irb(main)> URI.parse('http://example.com').normalize
# [jgarber] => #<URI::HTTP http://example.com/>```
# [jgarber] ```irb(main)> Addressable::URI.parse('http://example.com').normalize```
# [jgarber] ```=> => #<Addressable::URI URI:http://example.com/>```
# [jgarber] ```new URL('http://example.com').pathname
# [jgarber] Updated the issue on GitHub with a lengthy comment: https://github.com/microformats/microformats2-parsing/issues/9#issuecomment-617813565
# Loqi [jgarber623] This issue [came up in chat](https://chat.indieweb.org/microformats/2020-04-22#t1587535487332700) (via @gRegorLove):
> I don't think the only-domain URLs are supposed to be normalized adding the trailing slash like that.
@Zegnat noted [in a rep...
[tantek], JC1, Loqi_, aaronpk_, StacyBloom, KartikPrabhu, IWSlackGateway, [LewisCowles], [Ana_Rodrigues], gRegorLove_ and [snarfed] joined the channel
[calumryan] and Sajesajama joined the channel
[tw2113] and [jgarber] joined the channel
KartikPrabhu joined the channel
# gRegorLove_ yeah, there was an indiewebify.me issue trying to parse an XML document with php-mf2 https://github.com/indieweb/indiewebify-me/issues/78
# Loqi [mro] #78 false negative testing https://try.gogs.io/issue-5008
# gRegorLove I lean a bit in favor of adding / to normalize (for consistency), though I also wonder what benefits it has for consumers
# gRegorLove which error?
jamietanna joined the channel
# gRegorLove I'm missing the connection to IndieAuth
# gRegorLove I get it in general, though. If the parsed, normalized URL makes it easier for a fetching lib, sounds good
KartikPrabhu joined the channel
# gRegorLove Are there examples of that use-case failing, though? Seems like most any mature fetching lib is handling that
# gRegorLove `curl https://example.com` works for example
exigirl joined the channel
# gRegorLove iirc, the img+alt processing is creating a stdClass which then gets converted into the JSON object
Kaja_ joined the channel
# Zegnat This makes all tests pass for me: https://gist.github.com/Zegnat/5b3da181e0b64806636ca19aa35a6180
# Zegnat I think I may have found a bug there. But I am too tired to confirm with the spec. I think we expect `<img class="h-card" alt="Sally Ride" src="http://upload.wikimedia.org/wikipedia/commons/a/a4/Ride-s.jpg"/>` to also get an alt. But the test in ParseImpliedTest::testMultipleImpliedHCards suggests it does not get an alt
# gRegorLove I think that h-card example should have an alt. mf2py parses that way too.
# gRegorLove oh, maybe not. I was using KartikPrabhu's but just saw it's an experimental fork of mf2py
# gRegorLove But yes, it should. http://microformats.org/wiki/mf2p##if+img.h-x%5Bsrc%5D,+then+use+the+result
# gRegorLove Should make sure we have a test case covering each time "parse an img element for src and alt" appears on http://microformats.org/wiki/mf2p
gRegorLove_ joined the channel
# gRegorLove_ Ah, it's behind an experimental flag in mf2py, which python.microformats.io probably does not have turned on.
jeremycherfas joined the channel
# gRegorLove_ Raises the question if we should do that in php-mf2 as well
Bill_Bennett_NZ joined the channel
# KartikPrabhu gRegorLove: the alt was put behind a flag since it is a breaking change for consumers. The idea was to remove the flag and make it default in a "major version"
[tw2113] joined the channel