You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The HCard parser currently uses mf2py to get a list of "items" and only looks for an h-card item at the top level of that, i.e. alongside the h-entry item.
I think it's also OK to have a p-author h-card within an h-entry to indicate its author. For example, from the Microformats h-entry wiki page:
<articleclass="h-entry"><h1class="p-name">Microformats are amazing</h1><p>Published by <aclass="p-author h-card" href="http://example.com">W. Developer</a>
on <timeclass="dt-published" datetime="2013-06-13 12:00:00">13<sup>th</sup> June 2013</time></p><pclass="p-summary">In which I extoll the virtues of using microformats.</p><divclass="e-content"><p>Blah blah blah</p></div></article>
I guess this would require adding to the _parse_hcard() method, so that if the item is an h-card, to look for an author item within it (or more than one?) and see if it has an 'h-card'?
I guess any author h-card should take precedence over an h-card at the same level as the h-entry...?
It all gets a bit complicated!
The text was updated successfully, but these errors were encountered:
`h-card` can now be found correctly when embedded in `p-author` inside
`h-feed` and `h-entry` containers.
Refactoring: new package `mentions.tasks.incoming.parsing`:
- Moved `h-card` parsing logic from `@classmethod
HCard.from_soup(BeautifulSoup)` to `parse_hcard(BeautifulSoup)`
function.
- Also moved webmention 'type' parsing logic to this package.
The HCard parser currently uses mf2py to get a list of "items" and only looks for an
h-card
item at the top level of that, i.e. alongside theh-entry
item.I think it's also OK to have a
p-author h-card
within anh-entry
to indicate its author. For example, from the Microformats h-entry wiki page:I guess this would require adding to the
_parse_hcard()
method, so that if the item is anh-card
, to look for anauthor
item within it (or more than one?) and see if it has an 'h-card'?I guess any author h-card should take precedence over an
h-card
at the same level as theh-entry
...?It all gets a bit complicated!
The text was updated successfully, but these errors were encountered: