Expected output for nested h-cards duplicates the h-card at the top level
kylewm opened this issue · comments
The expected output for the three tests starting with:
https://github.com/microformats/tests/blob/master/h-card.html#L200
<div class="e-x-microformat">
<div class="h-card">
<a class="p-name u-url"
href="http://blog.lizardwrangler.com/"
>Mitchell Baker</a>
(<a class="p-org h-card"
href="http://mozilla.org/"
>Mozilla Foundation</a>)
</div>
</div>
<h3>The expected JSON output:</h3>
<pre class="prettyprint"><code class="e-x-output language-json">
{
"items": [{
"type": ["h-card"],
"properties": {
"url": ["http://blog.lizardwrangler.com/"],
"name": ["Mitchell Baker"],
"org": [{
"value": "Mozilla Foundation",
"type": ["h-card"],
"properties": {
"name": ["Mozilla Foundation"],
"url": ["http://mozilla.org/"]
}
}]
}
},{
"type": ["h-card"],
"properties": {
"name": ["Mozilla Foundation"],
"url": ["http://mozilla.org/"]
}
}]
}
</code></pre>
These examples seem to come from: http://microformats.org/wiki/microformats-2#h-card_org_h-card which do not have the duplicates.
Yes your right, this is an artefact left over from an old way of structuring the output. The second h-card should not be shown in the items array.
There are a few issues with the test as they have not been update since I built the first parser. The structure has changed a little. We need to go through them all and update them.
OK thank you. And sorry for the noise, I asked on IRC but I don't think anyone was around.