Skip to content

Arrays type and rels should not contain duplicate items #159

Closed
@gRegorLove

Description

@gRegorLove
<div class="h-entry h-cite h-entry">
  <a href="#" rel="me bookmark me"></a>
</div>

Currently parses:

{
    "items": [
        {
            "type": [
                "h-cite",
                "h-entry",
                "h-entry"
            ],
            "properties": {
                "name": [
                    ""
                ],
                "url": [
                    "#"
                ]
            }
        }
    ],
    "rels": {
        "me": [
            "#",
            "#"
        ],
        "bookmark": [
            "#"
        ]
    },
    "rel-urls": {
        "#": {
            "rels": [
                "me",
                "bookmark",
                "me"
            ]
        }
    },
    "debug": {
        "package": "https://packagist.org/packages/mf2/mf2",
        "version": "v0.4.1",
        "note": [
            "This output was generated from the php-mf2 library available at https://github.com/indieweb/php-mf2",
            "Please file any issues with the parser at https://github.com/indieweb/php-mf2/issues"
        ]
    }
}

Expected output:

{
    "items": [
        {
            "type": [
                "h-cite",
                "h-entry"
            ],
            "properties": {
                "name": [
                    ""
                ],
                "url": [
                    "#"
                ]
            }
        }
    ],
    "rels": {
        "bookmark": [
            "#"
        ]
        "me": [
            "#"
        ]
    },
    "rel-urls": {
        "#": {
            "rels": [
                "bookmark",
                "me"
            ]
        }
    }
}

Per spec update: microformats/microformats2-parsing#30

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions