mirror of
https://github.com/postlight/mercury-parser
synced 2024-10-31 03:20:40 +00:00
fix: select extended types before content (#733)
This commit is contained in:
parent
2dd3ce6045
commit
e8ba7ece29
@ -223,6 +223,10 @@ const RootExtractor = {
|
||||
content,
|
||||
};
|
||||
}
|
||||
let extendedResults = {};
|
||||
if (extractor.extend) {
|
||||
extendedResults = selectExtendedTypes(extractor.extend, opts);
|
||||
}
|
||||
const title = extractResult({ ...opts, type: 'title' });
|
||||
const date_published = extractResult({ ...opts, type: 'date_published' });
|
||||
const author = extractResult({ ...opts, type: 'author' });
|
||||
@ -247,11 +251,6 @@ const RootExtractor = {
|
||||
type: 'url_and_domain',
|
||||
}) || { url: null, domain: null };
|
||||
|
||||
let extendedResults = {};
|
||||
if (extractor.extend) {
|
||||
extendedResults = selectExtendedTypes(extractor.extend, opts);
|
||||
}
|
||||
|
||||
return {
|
||||
title,
|
||||
content,
|
||||
|
Loading…
Reference in New Issue
Block a user