#158 - Also remove diacritics from note title

This commit is contained in:
Simon Cambier
2023-01-27 23:29:32 +01:00
parent 6d1fba1429
commit 4f8370574c

View File

@@ -5,6 +5,7 @@
highlighter, highlighter,
isFileImage, isFileImage,
makeExcerpt, makeExcerpt,
removeDiacritics,
stringsToRegex, stringsToRegex,
} from '../tools/utils' } from '../tools/utils'
import ResultItemContainer from './ResultItemContainer.svelte' import ResultItemContainer from './ResultItemContainer.svelte'
@@ -13,6 +14,7 @@
export let note: ResultNote export let note: ResultNote
let imagePath: string | null = null let imagePath: string | null = null
let title = ''
$: { $: {
imagePath = null imagePath = null
@@ -28,15 +30,20 @@
$: reg = stringsToRegex(note.foundWords) $: reg = stringsToRegex(note.foundWords)
$: cleanedContent = makeExcerpt(note.content, note.matches[0]?.offset ?? -1) $: cleanedContent = makeExcerpt(note.content, note.matches[0]?.offset ?? -1)
$: glyph = false //cacheManager.getLiveDocument(note.path)?.doesNotExist $: glyph = false //cacheManager.getLiveDocument(note.path)?.doesNotExist
$: title = settings.showShortName ? note.basename : note.path $: {
title = settings.showShortName ? note.basename : note.path
if (settings.ignoreDiacritics) {
title = removeDiacritics(title)
}
}
</script> </script>
<ResultItemContainer <ResultItemContainer
glyph="{glyph}"
id="{note.path}" id="{note.path}"
selected="{selected}"
on:mousemove
on:click on:click
glyph="{glyph}"> on:mousemove
selected="{selected}">
<div style="display:flex"> <div style="display:flex">
<div> <div>
<div> <div>