mirror of
https://github.com/postlight/mercury-parser
synced 2024-11-17 03:25:31 +00:00
feat: support cleaning and transforms for all fields (#138)
This commit is contained in:
parent
1054d854dd
commit
25d9642ff9
@ -113,7 +113,12 @@ export function select(opts) {
|
||||
const [selector, attr] = matchingSelector;
|
||||
result = $(selector).attr(attr).trim();
|
||||
} else {
|
||||
result = $(matchingSelector).text().trim();
|
||||
let $node = $(matchingSelector);
|
||||
|
||||
$node = cleanBySelectors($node, $, extractionOpts);
|
||||
$node = transformElements($node, $, extractionOpts);
|
||||
|
||||
result = $node.text().trim();
|
||||
}
|
||||
|
||||
// Allow custom extractor to skip default cleaner
|
||||
|
Loading…
Reference in New Issue
Block a user