diff --git a/CHANGELOG.md b/CHANGELOG.md index 678d380..6b858df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Mercury Parser Changelog +### v2.2.11 (Jan 13, 2025) + +- [68e9b88a8d] - fix: androidauthority.com - Retain h3 tags (Josiah Campbell) [#41](https://github.com/jocmp/mercury-parser/pull/41) +- [c2bc68449f] - bump version v2.2.9 -> v2.2.10 (jocmp) + ### v2.2.10 (Jan 11, 2025) - [b8b4df7037] - feat: Add custom parser for mobilesyrup.com (Josiah Campbell) [#39](https://github.com/jocmp/mercury-parser/pull/39) diff --git a/src/extractors/custom/www.androidauthority.com/index.js b/src/extractors/custom/www.androidauthority.com/index.js index 99e810c..7b19305 100644 --- a/src/extractors/custom/www.androidauthority.com/index.js +++ b/src/extractors/custom/www.androidauthority.com/index.js @@ -16,18 +16,17 @@ export const WwwAndroidauthorityComExtractor = { selectors: [['meta[name="og:image"]', 'value']], }, + // Some pages have a nested header elements that are significant, and that the parser will + // remove if not following a paragraph. Adding this empty paragraph fixes it, and + // the empty paragraph will be removed anyway. content: { selectors: ['.d_Dd'], transforms: { ol: node => { node.attr('class', 'mercury-parser-keep'); }, - h2: $node => { - // Some pages have an element h2 that is significant, and that the parser will - // remove if not following a paragraph. Adding this empty paragraph fixes it, and - // the empty paragraph will be removed anyway. - $node.before('

'); - }, + h2: $node => $node.before('

'), + h3: $node => $node.before('

'), }, clean: [ '.d_f .d_nr', // Lead image