diff options
Diffstat (limited to 'src/static/js/client/sidebar-search.js')
-rw-r--r-- | src/static/js/client/sidebar-search.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/static/js/client/sidebar-search.js b/src/static/js/client/sidebar-search.js index b7b0b8f0..9d2cae34 100644 --- a/src/static/js/client/sidebar-search.js +++ b/src/static/js/client/sidebar-search.js @@ -963,6 +963,16 @@ async function handleDroppedIntoSearchInput(domEvent) { droppedText = matchedLink.innerText; } + if (droppedText.includes('-')) splitDashes: { + if (droppedURL) break splitDashes; + if (droppedText.includes(' ')) break splitDashes; + + const parts = droppedText.split('-'); + if (parts.length === 2) break splitDashes; + + droppedText = parts.join(' '); + } + info.searchInput.value = droppedText; activateSidebarSearch(info.searchInput.value); } |