#KartikPrabhuoh, I guess we are agreeing on the MathML as e-content but there a separate question on elements inside SVG
#btrem!@#!@#!@ I hate this web/chat window! Just lost my whole message. @$E#@
#sknebelI mentioned MathML for completeness/context because it and SVG are the formats that are explicitly called out for parsing in the HTML5 parsing spec after Zegnat asked if a HTML parser would put them in the DOM
#btremRight. My real world use case is adding `p-name` on a `<text>` element for an `h-card`.
#KartikPrabhuif the svg is directly in the HTML then the HTML parsers should pick it up
#KartikPrabhuif it is in an <img> tag then they won't
#sknebeland given that its explicitly mentioned I would expect an HTML parser to produce a DOM for it, and thus a microformats parser to find classes and everything to work
#btremSo far, the parsers I've tested have picked them up.
#btremUsing the python and php microformats validators linked from the mf wiki.
#sknebel(there is always some risk that not all parsers are always using HTML5 parsers and might do different things, but it answers "what do I expect" to me)
#btremThere's a screenshot of the results in the article, using the python one.
#KartikPrabhuyes that risk will always be there for any mf2 parsing
#sknebelright, and very much in "bug"/"you choose this tradeoff, we tell you to do otherwise" fields.
#btremWell, it *appears* that Google is doing something useful with it. It does show the street-address, locality, etc. Those are on html elements. It also shows the name of the business that is definitely coming from the svg text element.
#btremWhether that's due to microformats h-card classed, or just Google using that text, is hard to say.
#sknebelmight be worth testing with PHP and python when they are not using HTML5 parsers - I'd vote for explicitly making them support SVG if they happen to fail it in that case
#btremYes, the search results for Google and DuckDuckGo are very encouraging.
#btremthe python validator does work with the html.parser option selected.
#sknebelthats good, because that's truly terrible :D
#btremHmm, I did just notice something odd, though: the logo is an svg inside `<h1 class="e-logo">`. So in the JSON there's logo.0.html is the embedded svg markup, as it should; and logo.0.value, which is "Greenbank Plant Nursery Greenbank Plant Nursery".
#btremBecause the SVG has a title set to "Greenbank Plant Nursery", and there's also a `text` element with "Greenbank Plant Nursery."
#sknebelright, and the algorithm doesn't care about the tags its in, it just uses the text content of all the tags
#btremThat's correct, according to the parsing rules.
#btremThe `title` element does offer accessibility. But maybe it isn't needed in this case, since the text is visible and accessible to e.g. a screen reader.
#btremProbably not worth solving right now, but it might be worth keeping in the back of the mind, if svg starts getting used more.
#btremThe rule now is drop <script> and <style>. Maybe drop <script>, <style>, and <title> instead.
#btremBecause the <title> does not add to the text content of an html document (does it?). So maybe it shouldn't for svg, as well.
j12t joined the channel
#@aaronpk↩️ Nice! The thing that does most of the work for me is all in a library XRay:
https://github.com/aaronpk/xray
It normalizes content from Microformats feeds as well as Twitter and other stuff. Then it's a matter of reformatting the resulting JSON into a nice feed using some templates (twitter.com/_/status/1379990018911993856)
KartikPrabhu, Seirdy, mxd, [tw2113_Slack_], [jeremycherfas], hendursaga, [Murray], [KevinMarks], [snarfed], [scojjac], [tantek], [kimberlyhirsh], [schmarty], tomlarkworthy, [Rose], [aciccarello], IWSlackGateway and indy joined the channel