Skip to content

Not parsing nested microformats within dt-* properties #278

@Zegnat

Description

@Zegnat

Describe the bug

When an h-* microformat is embedded on a dt-* property, it does not show up in the parsing output.

To Reproduce

HTML input:

<div class="h-entry">
  <div class="p-test-one h-card"><span class="p-name">Yes</span></div>
  <div class="u-test-two h-card"><span class="p-name">Yes</span></div>
  <div class="dt-test-three h-card"><span class="p-name">Yes</span></div>
</div>

Expected behavior

Correct JSON output:

{
  "rels": {},
  "rel-urls": {},
  "items": [
    {
      "type": [
        "h-entry"
      ],
      "properties": {
        "test-one": [
          {
            "type": [
              "h-card"
            ],
            "properties": {
              "name": [
                "Yes"
              ]
            },
            "value": "Yes"
          }
        ],
        "test-two": [
          {
            "type": [
              "h-card"
            ],
            "properties": {
              "name": [
                "Yes"
              ]
            },
            "value": "Yes"
          }
        ],
        "test-three": [
          {
            "type": [
              "h-card"
            ],
            "properties": {
              "name": [
                "Yes"
              ]
            },
            "value": "Yes"
          }
        ]
      }
    }
  ]
}

Current behavior

The value for test-three is an array containing one flat string Yes. The nested object is dropped by the parser completely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions