#70 - Correctly toggling and saving settings.showContext

This commit is contained in:
Simon Cambier
2022-09-20 12:53:37 +02:00
parent 31aab49c54
commit 35110f488d
4 changed files with 35 additions and 27 deletions

View File

@@ -1,6 +1,6 @@
<script lang="ts">
import { getNoteFromCache } from 'src/notes'
import { SearchContextType, settings } from 'src/settings'
import { settings } from 'src/settings'
import type { ResultNote } from '../globals'
import { getMatches } from '../search'
import { highlighter, makeExcerpt, stringsToRegex } from '../utils'
@@ -29,7 +29,7 @@
{/if}
</div>
{#if $settings.showContext !== SearchContextType.None}
{#if $settings.showContext}
<div class="omnisearch-result__body">
{@html cleanedContent.replace(reg, highlighter)}
</div>