Skip to content

Commit 3eda47c

Browse files
authored
Merge pull request #154 from joneswah/title-fix
Only extract the Title in the HEAD element
2 parents a50e40b + 1c6ded9 commit 3eda47c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function getTitle(doc: cheerio.Root) {
4343
metaTagContent(doc, `og:title`, `property`) ||
4444
metaTagContent(doc, `og:title`, `name`);
4545
if (!title) {
46-
title = doc(`title`).text();
46+
title = doc(`head > title`).text();
4747
}
4848
return title;
4949
}

0 commit comments

Comments
 (0)