#microformats 2018-07-23

2018-07-23 UTC
#
gRegorLove
tantek__ or [kevinmarks], can you move this repo? https://github.com/indieweb/php-mf2/issues/179
#
Loqi
[gRegorLove] #179 Move this repo to the microformats github org
#
gRegorLove
Also can you let microformats org members close issues?
#
gRegorLove
I'm going through old issues. A few have merged changes but weren't closed.
#
gRegorLove
on microformats/tests
[matpacker] joined the channel
#
gRegorLove
TIL: hNews
#
gRegorLove
Good point raised in https://github.com/microformats/tests/issues/72, we don't seem to have /h-news or backcompat rules for it. Was it dropped in favor of /h-entry?
#
Loqi
[dissolve] #72 many properties assumed in back-compat that are not listed as backcompat values
#
gRegorLove
Interesting rabbit hole. Developed by AP as part of their AP News Registry, which was spun off into NewsRight, which was closed in 2013.
[jgmac1106], [eddie], [schmarty], gRegorLove, [chrisaldrich], KartikPrabhu and ben_thatmustbeme joined the channel
[dan] joined the channel
#
KartikPrabhu
oh no! tommorris made fun of me :( ;)
[chrisaldrich], [pfefferle] and [matpacker] joined the channel
#
tantek__
KartikPrabhu: lol - hey at least he's still code reviewing :)
#
KartikPrabhu
of course! given the response context I took it as a compliment :P
indy, adactio and [kevinmarks] joined the channel
#
Loqi
[@kevinmarks] @jesslynnrose My favourite is still debugstr("if you see this, call (408) 996 1010, ask for Peter Hoddie and tell him how you got here")
#
sknebel
KartikPrabhu: ouch that #108 is rabbithole. don't see why that's happening either yet...
#
@JmacDotOrg
Speaking of code I released a new Web::Microformats2 that passes 11 more tests than it used to, whee https://metacpan.org/release/JMAC/Web-Microformats2-0.401
(twitter.com/_/status/1021376272952430593)
#
sknebel
okay, problem identified, now how to solve it without horrible monkey-patching
[jgmac1106] and snarfed joined the channel
#
Loqi
[snarfed] #112 inner whitespace in p- values shouldn't be collapsed
#
snarfed
i think i found a conflict with #3 on https://pin13.net/mf2/whitespace.html
#
snarfed
in the expected name and content.value in #3 there, there's no space between \n and World
#
snarfed
but following your algorithm would (i think) include one
#
snarfed
mind looking when you get a chance?
#
snarfed
(also cc aaronpk)
[eddie], JonathanNeal, twisted`, [manton], MylesBraithwaite, Phae, [chrisaldrich] and jackjamieson joined the channel
#
sknebel
KartikPrabhu: took a while to find, the copy function didn't deepcopy the attributes dictionary, so while the tag elements where distinct, they reused the list of classes between the two....
#
sknebel
PR opened
snarfed, snarfed1, jackjamieson, [kevinmarks], indy, [cleverdevil] and [Chris_Lott] joined the channel
#
KartikPrabhu
sknebel: wow! that is some really weird bug in copy for Tag
#
sknebel
they just missed that there's nested data there
snarfed joined the channel
#
KartikPrabhu
yeah I would have never caught this
#
sknebel
yeah, I apparently only removed it in another testing branch ;)
#
KartikPrabhu
sknebel: great! will test it out and merge
#
sknebel
as said, I'd like to avoid the entire reparsing step for copied soups too
#
sknebel
but that is just slow, but works, so no need to handle it now
snarfed, [chrisaldrich], [kevinmarks], [dougbeal], tantek, [eddie], mayo, tantek__ and KartikPrabhu joined the channel; snarfed left the channel
#
gRegorLove
tantek, Reminder of moving the php-mf2 repo and microformats org member permissions: https://chat.indieweb.org/microformats/2018-07-23#t1532304668365700
#
Loqi
[gRegorLove] tantek__ or [kevinmarks], can you move this repo? https://github.com/indieweb/php-mf2/issues/179
[cleverdevil], [matpacker] and snarfed joined the channel
#
snarfed
just to confirm, you agree that https://github.com/microformats/mf2py/issues/112 is a bug, and that the example needs to be fixed, right?
#
Loqi
[snarfed] #112 inner whitespace in p- values shouldn't be collapsed
#
snarfed
so your q is just about the code in the PR?
#
snarfed
github markdown ate part of your q, so i don't entirely follow it
#
KartikPrabhu
updated comment
#
snarfed
inline comments are usually best for this kind of thing
#
KartikPrabhu
there seems to be a lot of special casing for <p> all over the place
#
snarfed
afaik it's exactly the same logic as before, since <p> and </p> were the only things that used integer elements in the items list
#
tantek__
this: "github markdown ate part of your q"
#
snarfed
i just need to add another pair of special items (for tracking <pre>s)
#
KartikPrabhu
ok will take a closer look. have it in my local as a branch
#
sknebel
oh, I totally missed there's a PR to look at. (guess I'll put mine for the same bug on the backburner then)
#
snarfed
thanks sknebel! it's not pretty, but it works
#
sknebel
will take a look tomorrow
#
sknebel
KartikPrabhu++ btw for productive back-and-forth on the copy-thing
#
Loqi
kartikprabhu has 30 karma in this channel (212 overall)
#
snarfed
no hurry
#
sknebel
(although I get now why their solution for copying a document was "serialize and parse fresh"....)
#
KartikPrabhu
sknebel: thanks for looking at this. I would have been completely stuck!
#
KartikPrabhu
good thing I have SVG on my site so it broke all this :P
#
sknebel
need to add that to a few tests too
#
KartikPrabhu
yes! I was going to suggest that. and also add the "string" case in the existing tests
#
KartikPrabhu
snarfed: in the meantime if you know how to do this https://github.com/microformats/mf2py/issues/113
#
Loqi
[kartikprabhu] #113 add lxml parser to tests
#
[kevinmarks]
Html5lib will use lxml if its installed because python dependency management encourages that kind of thing.
#
KartikPrabhu
[kevinmarks]: yes, this was more about testing it explicitly with both
#
KartikPrabhu
so we can catch weird stuff in the tests
#
snarfed
KartikPrabhu++
#
Loqi
kartikprabhu has 31 karma in this channel (213 overall)
#
snarfed
testing+++
#
Loqi
testing has 2 karma in this channel (31 overall)
#
KartikPrabhu
I think we can for go testing with the html.parser since that is pretty terrible anyway
#
[kevinmarks]
So you may need to test 3 combinations
#
KartikPrabhu
oh! you are saying html5lib will already use lxml internally?
#
[kevinmarks]
Beautiful Soup will use one of the three, Html5lib will use lxml roo
#
KartikPrabhu
no understand
#
[kevinmarks]
I agree that avoiding html.parser is a good idea
#
KartikPrabhu
BS uses html5lib and lxml and we can skip html.parser so 2 cases?
#
[kevinmarks]
But there may be differences between Html5lib alone, and Html5lib+lxml
#
KartikPrabhu
isn't that covered by LXML case?
#
KartikPrabhu
so html5lib alone and lxml (which covers html5lib+lxml) ?
#
[kevinmarks]
(maybe not, as Html5lib has a lot of tests, but if it's easy to add a config could be useful)
#
[kevinmarks]
Html5lib alone, lxml alone and Html5lib +lxml
#
snarfed
KartikPrabhu: btw setting up the tests to try different parsers should be very straightforward, just pass the parser a bs4 doc created with each parser explicitly. eg https://github.com/microformats/mf2py/issues/110#issuecomment-406026455
#
Loqi
[snarfed] @sknebel thanks for looking! with lxml installed, this reproduces it for me: ```py mf2py.parse(doc=bs4.BeautifulSoup('foo', 'lxml')) ```
#
[kevinmarks]
This is partly because beautiful Soup copes with all combinations