always highlight tokens
This commit is contained in:
parent
88923910aa
commit
080805f714
|
@ -105,7 +105,6 @@ export function getDefaultSettings(app: App): LocatorSettings {
|
|||
maxEmbeds: 5,
|
||||
renderLineReturnInExcerpts: true,
|
||||
showCreateButton: false,
|
||||
highlight: true,
|
||||
showPreviousQueryResults: true,
|
||||
simpleSearch: false,
|
||||
tokenizeUrls: false,
|
||||
|
|
|
@ -82,17 +82,4 @@ export function injectSettingsUserInterface(
|
|||
await saveSettings(plugin)
|
||||
})
|
||||
)
|
||||
|
||||
// Highlight results
|
||||
new Setting(containerEl)
|
||||
.setName('Highlight matching words in results')
|
||||
.setDesc(
|
||||
'Will highlight matching results when enabled. See README for more customization options.'
|
||||
)
|
||||
.addToggle(toggle =>
|
||||
toggle.setValue(settings.highlight).onChange(async v => {
|
||||
settings.highlight = v
|
||||
await saveSettings(plugin)
|
||||
})
|
||||
)
|
||||
}
|
||||
|
|
|
@ -71,7 +71,6 @@ export interface LocatorSettings extends WeightingSettings {
|
|||
/** If a query returns 0 result, try again with more relax conditions */
|
||||
simpleSearch: boolean
|
||||
tokenizeUrls: boolean
|
||||
highlight: boolean
|
||||
splitCamelCase: boolean
|
||||
openInNewPane: boolean
|
||||
verboseLogging: boolean
|
||||
|
|
|
@ -15,9 +15,7 @@ export class TextProcessor {
|
|||
* @returns The html string with the matches highlighted
|
||||
*/
|
||||
public highlightText(text: string, matches: SearchMatch[]): string {
|
||||
const highlightClass = `suggestion-highlight locator-highlight ${
|
||||
this.plugin.settings.highlight ? 'locator-default-highlight' : ''
|
||||
}`
|
||||
const highlightClass = 'suggestion-highlight locator-highlight locator-default-highlight'
|
||||
|
||||
if (!matches.length) {
|
||||
return text
|
||||
|
|
Loading…
Reference in New Issue
Block a user