Text Extractor requirement

This commit is contained in:
Simon Cambier
2023-01-19 21:46:53 +01:00
parent 9c97a71d20
commit 42ba653642
3 changed files with 40 additions and 42 deletions

View File

@@ -5,16 +5,17 @@ import {
parseFrontMatterAliases,
Platform,
} from 'obsidian'
import { getTextExtractor, type SearchMatch } from '../globals'
import {
excerptAfter,
excerptBefore,
getChsSegmenter,
getTextExtractor,
highlightClass,
isSearchMatch,
regexLineSplit,
regexStripQuotes,
regexYaml,
type SearchMatch,
} from '../globals'
import { settings } from '../settings'
import { type BinaryLike, createHash } from 'crypto'
@@ -236,8 +237,8 @@ export function getCtrlKeyLabel(): 'ctrl' | '⌘' {
}
export function isFileIndexable(path: string): boolean {
const canIndexPDF = (!Platform.isMobileApp || !!getTextExtractor()) && settings.PDFIndexing
const canIndexImages = (!Platform.isMobileApp || !!getTextExtractor()) && settings.imagesIndexing
const canIndexPDF = !!getTextExtractor() && settings.PDFIndexing
const canIndexImages = !!getTextExtractor() && settings.imagesIndexing
return (
isFilePlaintext(path) ||
isFileCanvas(path) ||