mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 03:59:05 +01:00
client/quick search results: add a whitespace between attributes
This commit is contained in:
parent
e2cd357319
commit
4d07a1aab6
@ -86,10 +86,6 @@ const TPL = /*html*/`
|
||||
font-size: .75em;
|
||||
}
|
||||
|
||||
.quick-search .search-result-attributes br {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.quick-search .search-result-content {
|
||||
margin-top: 8px;
|
||||
padding: 8px;
|
||||
@ -287,7 +283,9 @@ export default class QuickSearchWidget extends BasicWidget {
|
||||
|
||||
// Add attribute snippet (tags/attributes) below the title if available
|
||||
if (result.highlightedAttributeSnippet) {
|
||||
itemHtml += `<div class="search-result-attributes">${result.highlightedAttributeSnippet}</div>`;
|
||||
// Replace <br> with a blank space to join the atributes on the same single line
|
||||
const snippet = (result.highlightedAttributeSnippet as string).replace(/<br\s?\/?>/g, " ");
|
||||
itemHtml += `<div class="search-result-attributes">${snippet}</div>`;
|
||||
}
|
||||
|
||||
// Add content snippet below the attributes if available
|
||||
@ -295,8 +293,6 @@ export default class QuickSearchWidget extends BasicWidget {
|
||||
itemHtml += `<div class="search-result-content">${result.highlightedContentSnippet}</div>`;
|
||||
}
|
||||
|
||||
console.log(result);
|
||||
|
||||
itemHtml += `</div>`;
|
||||
|
||||
$item.html(itemHtml);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user