@@ -71,8 +71,9 @@
|
|||||||
<span class="omnisearch-result__title">
|
<span class="omnisearch-result__title">
|
||||||
<span bind:this="{elFilePathIcon}"></span>
|
<span bind:this="{elFilePathIcon}"></span>
|
||||||
<span>{@html title.replace(reg, highlighterGroups)}</span>
|
<span>{@html title.replace(reg, highlighterGroups)}</span>
|
||||||
<span class="omnisearch-result__extension"
|
<span class="omnisearch-result__extension">
|
||||||
>.{getExtension(note.path)}</span>
|
.{getExtension(note.path)}
|
||||||
|
</span>
|
||||||
|
|
||||||
<!-- Counter -->
|
<!-- Counter -->
|
||||||
{#if note.matches.length > 0}
|
{#if note.matches.length > 0}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export function highlighterGroups(...args: any[]) {
|
|||||||
args[2] !== null &&
|
args[2] !== null &&
|
||||||
args[2] !== undefined
|
args[2] !== undefined
|
||||||
)
|
)
|
||||||
return `${args[1]}<span class="${highlightClass}">${args[2]}</span>`
|
return `<span>${args[1]}</span><span class="${highlightClass} b">${args[2]}</span>`
|
||||||
return '<no content>'
|
return '<no content>'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user