#microformats 2018-04-01

2018-04-01 UTC
[kevinmarks] joined the channel
#
aaronpk
ooh tricky, good one to add to that page
#
aaronpk
a browser would show that as "Correct name Correct summary" so i'm inclined to go with that
#
aaronpk
yeah i think that makes the most sense
#
aaronpk
also cool that zegnat's algorithm gives that already
KevinMarks, KevinMarks_, j12t, chrisaldrich and KartikPrabhu joined the channel
#
KartikPrabhu
aaronpk: I think Zegnat is sort of replicating DOM.innerText or something. I am using a variant (boot-legged) version of his algo that does not need me to traverse the entire tree on my own
j12t, [tantek], jacky, chrisaldrich and tantek joined the channel
#
Zegnat
KartikPrabhu, I am looking forward to seeing an improved version that is less DOM reliant! I'll have to take a look at what you are doing when I get home.
#
KartikPrabhu
Zegnat: my code is not up yet. It does do some DOM parsing but I am defering that to BeautifulSoup methods instead of traversing the tree myself
#
Zegnat
And I am not home yet for at least another 36 hours or so ;-) I am not doing code stuff on this family trip.
#
Zegnat
I wrote the algo based on DOM mostly because I expect all parsers to have access to it in some way (as they needed to parse HTML). If you have better and faster methods in python, definitely use them
#
KartikPrabhu
yeah I am sure diff parsers would implement this differently
KevinMarks, [jeremycherfas], j12t, [grib], Garbee, KartikPrabhu and webchat254 joined the channel; webchat254 left the channel
#
@iammakeupjunkie
hReview: MEMEBOX I Dew Care Space Kitten Mask & I Dew Care Sugar Kitten Mask #MEMEBOX #IDEWCARE #SugarKitten #SpaceKitten #UltaBeauty #MiniMeowTrio http://iamthemakeupjunkie.blogspot.com/2018/04/review-memebox-i-dew-care-space-kitten.html
(twitter.com/_/status/980413270245953536)
j12t, davy and webchat254 joined the channel
#
webchat254
hi
j12t, KevinMarks and tantek joined the channel
j12t, Garbee, [miklb], [snarfed] and [kevinmarks] joined the channel
#
[kevinmarks]
Have we looked at <pre>?
#
KartikPrabhu
[kevinmarks]: what about <pre> ?
webchat254, j12t, [jeremycherfas] and KevinMarks joined the channel
#
billchilds
edited /listing-examples-fr (+199) "/* Exemples */"
(view diff)
j12t, symon1, davy__ and tantek joined the channel
#
[kevinmarks]
<pre>changes whitespace behaviour
[kevinmarks] joined the channel
#
KartikPrabhu
in HTML display yes. but this was for value and name properties
chrisaldrich joined the channel
#
aaronpk
i'm gonna have to do a round of examples with <pre>
#
aaronpk
because <pre>hello\nworld</pre> should include a newline in any plaintext representation
#
[kevinmarks]
It changes what happens with copying the text though, which was part of the model we were working from.
#
KartikPrabhu
aaronpk: yeah that wouldn't work with current algorithm
#
[kevinmarks]
What should maybe look at post examples with code in
KartikPrabhu, tantek, j12t and KevinMarks joined the channel
#
KartikPrabhu
aaronpk: here is an example with <pre> http://pin13.net/mf2-dev/?id=20180401200715868 I am not sure what the expected output is here
#
aaronpk
wow that's a mess
#
aaronpk
check the "render html" page and then copypaste the resulting text and that's what i would expect i think :)
#
sknebel
please add this to the whitespace issue on github too
j12t joined the channel
#
Loqi
[Zegnat] #15 What should mf2 textContent parsing result in? User expectation vs. DOM specification.
KartikPrabhu joined the channel
#
KartikPrabhu
yeah <pre> is a very special case and needs to be handled separately
#
KartikPrabhu
now looks at fixing <pre> spacing in mf2py whitespacing.
#
KartikPrabhu
Looks like I'll have to replicate BeutifulSoups get_text
#
aaronpk
I am so glad you all are tackling this. The whole reason I like mf2 is it means I don't have to think about HTML parsing.
#
KartikPrabhu
lol! BeautifulSoup is pretty lazy; it just concatenates all the strings it finds
#
KartikPrabhu
might have to do DOM walking
#
KartikPrabhu
starts walking!
#
@JmacDotOrg
Over the last 24 hours I’ve fallen down a 🐇🕳 of rolling my own Microformats-2 parser. It feels super great and also very very terrible.
(twitter.com/_/status/980550489334013952)
j12t joined the channel
#
KartikPrabhu
jmac: which language for your mf2 parser?
[snarfed] joined the channel
#
KartikPrabhu
now tries his own <pre> example
KevinMarks_ joined the channel
#
KartikPrabhu
<pre> is tricky since any element has to "remember" that it has a child <pre>
#
KartikPrabhu
waits for Zegnat to update his algorithm and stashes his code
[Vanessa], [chrisaldrich], jacky, chrisaldrich, KevinMarks, KartikPrabhu, [kevinmarks], [snarfed], [miklb] and j12t joined the channel