Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse href and title attributes on <link> elements for u- and p- properties respectively. #74

Closed
Zegnat opened this issue Jan 6, 2018 · 0 comments · Fixed by #75
Closed

Comments

@Zegnat
Copy link
Member

Zegnat commented Jan 6, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant