Skip to content
This repository has been archived by the owner on Feb 24, 2022. It is now read-only.

Commit

Permalink
Fix twitter uses name not property attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonpage committed Aug 12, 2016
1 parent 82ac24e commit e887705
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function buildRuleset(name, rules) {

const titleRules = buildRuleset('title', [
['meta[property="og:title"]', node => node.element.content],
['meta[property="twitter:title"]', node => node.element.content],
['meta[name="twitter:title"]', node => node.element.content],
['meta[name="hdl"]', node => node.element.content],
['title', node => node.element.text],
]);
Expand All @@ -50,7 +50,7 @@ const iconRules = buildRuleset('icon', [

const imageRules = buildRuleset('image', [
['meta[property="og:image"]', node => node.element.content],
['meta[property="twitter:image"]', node => node.element.content],
['meta[name="twitter:image"]', node => node.element.content],
['meta[name="thumbnail"]', node => node.element.content],
['img', node => node.element.src],
]);
Expand Down

0 comments on commit e887705

Please sign in to comment.