Skip to content

Conversation

@nex3
Copy link
Contributor

@nex3 nex3 commented Oct 4, 2024

Checklist

  • Added tests covering the parsing behaviour changes.

Changes to parsing behaviour

Previously, this was checking the same array returned by findChildren(). However, findChildren() excludes children that are the values of properties themselves. Per spec, if there are any nested microformats implicit properties should not be parsed.

This now matches the behavior of https://php.microformats.io/.

Example input covered by new behaviour

<div class="h-entry">
  <a href="http://example.com/"></a>
  <div class="p-author h-card">
    <span class="p-name">microformats</span>
  </div>
</div>

Example output from new behaviour

{
  "properties": {
    "author": [
      {
        "properties": {
          "name": ["microformats"]
        },
        "type": ["h-card"],
        "value": "microformats"
      }
    ]
  },
  "type": ["h-entry"]
}

nex3 and others added 2 commits October 3, 2024 20:44
Previously, this was checking the same array returned by
`findChildren()`. However, `findChildren()` excludes children that are
the values of properties themselves. Per spec, if there are *any*
nested microformats implicit properties should not be parsed.

This now matches the behavior of https://php.microformats.io/.
@aimee-gm aimee-gm changed the title Don't parse implicit properties with nested property microformats fix: don't parse implicit properties with nested property microformats May 31, 2025
@aimee-gm aimee-gm merged commit b6c549b into microformats:main May 31, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants