Skip to content

Fix backcompat hfeed parsing #137

Closed
Closed
@gRegorLove

Description

@gRegorLove

Using the example in microformats/microformats2-parsing#11 (comment), running just the hfeed element through the parser seems to incorrectly parse the entry-title and entry-content without an intervening hentry:

<div id="page" class="hfeed site wrap">
	<h1 class="entry-title"><span class='p-name'>title</span></h1>
	other content
	<div class="entry-content">
		<div class="e-content">this is a test for indieweb post </div> <span class="syn-text">Also on:</span>
		<!--syndication links -->
	</div>
</div>

currently parses as:

{
    "items": [
        {
            "type": [
                "h-feed"
            ],
            "properties": {
                "name": [
                    "title"
                ],
                "content": [
                    {
                        "html": "this is a test for indieweb post ",
                        "value": "this is a test for indieweb post"
                    }
                ]
            }
        }
    ],
    "rels": {},
    "debug": {
        "package": "https://packagist.org/packages/mf2/mf2",
        "version": "v0.3.2",
        "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"
        ]
    }
}

I would expect:

So properties should be empty in the parsed result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions