Wip less magic strings

This commit is contained in:
Simon Cambier
2022-10-01 13:59:14 +02:00
parent 124e5f5d61
commit 424ce687ae
7 changed files with 25 additions and 20 deletions

View File

@@ -243,7 +243,7 @@
</div>
<div class="prompt-instruction">
<span class="prompt-instruction-command">ctrl+h</span>
<span>to toggle context</span>
<span>to toggle excerpt</span>
</div>
<div class="prompt-instruction">
<span class="prompt-instruction-command">esc</span><span>to close</span>

View File

@@ -1,6 +1,6 @@
<script lang="ts">
import { getNoteFromCache } from 'src/notes'
import { settings, showContext } from 'src/settings'
import { settings, showExcerpt } 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 $showContext}
{#if $showExcerpt}
<div class="omnisearch-result__body">
{@html cleanedContent.replace(reg, highlighter)}
</div>