Parse href and title attributes on <link> elements for u- and p- properties respectively.
Zegnat opened this issue · 0 comments
Zegnat commented
The microformats parsing spec was updated yesterday to reflect a 2015 resolution on <link>
elements. The Ruby parser should be updated to reflect this.
Example
An HTML document that uses an existing rel-canonical <link>
element to communicate the page’s u-url
and p-name
:
<!doctype html>
<html class="h-entry">
<head>
<link rel="canonical" class="u-url p-name" href="https://example.com/" title="Example.com homepage">
</head>
<body></body>
</html>
Expected parser output (rels
and rel-urls
have been left out):
{
"items": [
{
"type": [ "h-entry" ],
"properties": {
"name": [ "Example.com homepage" ],
"url": [ "https://example.com/" ]
}
}
]
}
Live example
- https://vanderven.se/martijn/big5.html uses
u-url
andu-author
on the<link>
elements withrel="canonical"
andrel="author"
respectively.