Open gRegorLove opened 6 years ago
this is already clarified in the lines
if parsing a backcompat root, parse child element class name(s) for backcompat properties else parse a child element class for property class name(s) "p-,u-,dt-,e-"
I understand the logic of it now, but I needed to re-read it a couple times. I wasn't holding that definition of "property" in mind when I got to the recursion step, instead I'd switched back to microformat properties in general.
I don't think this has caused confusion before, so maybe it's just me. A minimal formatting update to highlight it as a term might help:
- if such class(es) are found, it is a property element
- add properties found to current microformat's properties:
{ }
structure- parse a child element for microformats (recurse)
- if that child element itself has a microformat ("h-*" or backcompat roots) and is a property element, add it into the array of values for that property as a { } structure, add to that { } structure:
If there is a nested mf2 property + mf2 root inside an mf1 root, should parsers:
children
Example markup derived from @chrisaldrich's post, which temporarily lost the
h-entry
leavinghentry
with mf2u-invitee h-card
properties:The second link there, sans h-card, is to contrast that mf2 properties on their own inside an mf1 root are ignored.
php-mf2 result:
mf2py result:
microformats-node result:
I'm inclined to answer 1, like mf2py does.
The quote from http://microformats.org/wiki/microformats2-parsing that seems unclear is:
"and is a property element" could be clarified so it's explicit about what to do in backcompat.