generated from nhcarrigan/template
chore: format
This commit is contained in:
@@ -135,7 +135,9 @@
|
|||||||
<Markdown content={line.content} searchQuery={currentSearchQuery} />
|
<Markdown content={line.content} searchQuery={currentSearchQuery} />
|
||||||
{:else}
|
{:else}
|
||||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -- Search highlighting on internal terminal content -->
|
<!-- eslint-disable-next-line svelte/no-at-html-tags -- Search highlighting on internal terminal content -->
|
||||||
<span class="whitespace-pre-wrap">{@html highlightText(line.content, currentSearchQuery)}</span>
|
<span class="whitespace-pre-wrap"
|
||||||
|
>{@html highlightText(line.content, currentSearchQuery)}</span
|
||||||
|
>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
|
|||||||
@@ -39,9 +39,7 @@ export const searchState = {
|
|||||||
searchStore.update((state) => ({
|
searchStore.update((state) => ({
|
||||||
...state,
|
...state,
|
||||||
currentMatchIndex:
|
currentMatchIndex:
|
||||||
state.matchCount > 0
|
state.matchCount > 0 ? (state.currentMatchIndex + 1) % state.matchCount : 0,
|
||||||
? (state.currentMatchIndex + 1) % state.matchCount
|
|
||||||
: 0,
|
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -60,9 +58,6 @@ export const searchState = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const isSearchActive = derived(
|
export const isSearchActive = derived(searchStore, ($search) => $search.isActive);
|
||||||
searchStore,
|
|
||||||
($search) => $search.isActive
|
|
||||||
);
|
|
||||||
|
|
||||||
export const searchQuery = derived(searchStore, ($search) => $search.query);
|
export const searchQuery = derived(searchStore, ($search) => $search.query);
|
||||||
|
|||||||
Reference in New Issue
Block a user