Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions entrypoints/inject-utils/document-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import { PruningContentFilter } from './pruning-content-filter'
const logger = Logger.child('document-parser')

const INTERNAL_ID_DATA_KEY = 'data-nativemind-parser-internal-id'
const IGNORE_TAGS: (keyof HTMLElementTagNameMap)[] = ['head', 'nav', 'style', 'link', 'meta', 'script', 'noscript', 'canvas', 'iframe', 'object', 'embed', 'footer', 'dialog']
const IGNORE_CLASSES: string[] = ['hidden', 'ignore', 'skip-link', 'sidenav', 'footer', 'blog-footer-bottom']
const IGNORE_IDS: string[] = ['side_nav', 'sidenav', 'blog-calendar', 'footer', 'page_end_html']
const IGNORE_TAGS: (keyof HTMLElementTagNameMap)[] = ['head', 'style', 'link', 'meta', 'script', 'noscript', 'canvas', 'iframe', 'object', 'embed', 'footer', 'dialog']
const IGNORE_CLASSES: string[] = ['hidden', 'ignore', 'skip-link', 'footer', 'blog-footer-bottom']
const IGNORE_IDS: string[] = ['blog-calendar', 'footer', 'page_end_html']
const IGNORE_ATTRS: string[] = []

function ignoreElement(node: Node) {
Expand Down
6 changes: 3 additions & 3 deletions entrypoints/inject-utils/pruning-content-filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ export class PruningContentFilter {

// Common excluded tags
this.excludedTags = [
'script', 'style', 'header', 'footer', 'aside', 'menu',
'script', 'style', 'header', 'footer', 'menu',
'noscript', 'meta', 'link', 'title', 'head',
'.hidden', '.ignore', '.skip-link', '.sidenav', '.footer', '.blog-footer-bottom',
'#side_nav', '#sidenav', '#blog-calendar', '#footer', '#page_end_html',
'.ignore', '.skip-link', '.footer', '.blog-footer-bottom',
'#blog-calendar', '#footer', '#page_end_html',
'[id*="skip-link"]', '[class*="skip-link"]', '[id*="skip_link"]', '[class*="skip_link"]',
]
this.includedTags = ['code']
Expand Down
Loading