#microformats 2019-08-03

2019-08-03 UTC
KartikPrabhu, [prtksxna], seki[m] and seki[m]1 joined the channel
#
[prtksxna]
noob question: what is the difference between `e-content` and `p-content`?
#
aaronpk
i can never remember where on the wiki this is documented
#
Loqi
microformats2 prefix conventions
#
KartikPrabhu
[prtksxna]: e-content will be parsed as if it were a an HTML markup whereas p-content is parsed a "plain-text"
#
aaronpk
that's arguably not the best explanation
#
aaronpk
(the link i mean)
#
KartikPrabhu
the best way to do this is to just test the markup in some parser
#
[prtksxna]
Ah, understood, thanks aaronpk and KartikPrabhu!
#
[prtksxna]
KartikPrabhu: I’ve been using https://indiewebify.me/validate-h-entry/. Would you suggest something else? Maybe something where I can paste markup (instead of having to deploy on my site)
#
[prtksxna]
aaronpk: From that post, how can something be both `e-content` and `p-summary` when `p-*` is expecting plain text?
#
aaronpk
it just means the "summary" property will be plaintext, and the "content" property will contain the HTML markup
#
KartikPrabhu
p-* isn't expecting plain-text. p-* means "parse this as if it were plain text" so the output will be plain-text not the input
#
[prtksxna]
Ah, I see! 😄
#
aaronpk
also the parsers don't care about the property names, only the prefixes: https://php.microformats.io/?id=20190803025905978
#
[prtksxna]
So that is the parser’s job—to remove the HTML and get a plain text version?
#
[prtksxna]
I’ve been working on adding `add_theme_support('microformats2')` to my theme and this was really helpful. Thanks both of you 😄
#
KartikPrabhu
[prtksxna]: if you want the gory details http://microformats.org/wiki/textcontent-parsing
#
aaronpk
(hint: you don't)
#
KartikPrabhu
I agree :P and I wrote that piece of the code for mf2py
#
aaronpk
i do not envy you one bit
[Michael_Beckwit, [Lewis_Cowles] and [tantek] joined the channel; Magnus[m] left the channel
#
Zegnat
I do not even envy myself for having tried to write that parsing definition :P
#
Zegnat
!tell KartikPrabhu if you want to see the next step up from /textcontent-parsing: https://github.com/Zegnat/php-innertext
#
Loqi
Ok, I'll tell them that when I see them next
[KevinMarks], [Rose], dy5es41[m]1, IWSlackGateway, [Lewis_Cowles], [Jeannie], [mapkyca], Dby0[m], [jgmac1106], [grantcodes], KartikPrabhu, [tantek] and [Michael_Beckwit joined the channel