Fix code to ignore titles when we already have one.

pull/51/head
Gijs Kruitbosch 9 years ago
parent a924e31729
commit 14afc21b96

@ -1008,7 +1008,10 @@
}
}
if (localName === "title") {
// Only use the first title, because SVG might have other
// title elements which we don't care about (medium.com
// does this, at least).
if (localName === "title" && !this.doc.title) {
this.doc.title = node.textContent.trim();
} else if (localName === "head") {
this.doc.head = node;

@ -1,5 +1,5 @@
{
"title": "sidebar-open-28px",
"title": "On Behalf of “Literally” — Medium",
"byline": "Courtney Kirchoff",
"excerpt": "In defense of the word “literally” and why you or someone you know should stop misusing the word, lest they drive us fig…"
}

Loading…
Cancel
Save