diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /app/assets/javascripts/search/index.js | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'app/assets/javascripts/search/index.js')
-rw-r--r-- | app/assets/javascripts/search/index.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/assets/javascripts/search/index.js b/app/assets/javascripts/search/index.js index ba12f31ef87..d4ee857c9c1 100644 --- a/app/assets/javascripts/search/index.js +++ b/app/assets/javascripts/search/index.js @@ -1,6 +1,7 @@ import setHighlightClass from 'ee_else_ce/search/highlight_blob_search_result'; import { queryToObject } from '~/lib/utils/url_utility'; import refreshCounts from '~/pages/search/show/refresh_counts'; +import syntaxHighlight from '~/syntax_highlight'; import { initSidebar, sidebarInitState } from './sidebar'; import { initSearchSort } from './sort'; import createStore from './store'; @@ -8,10 +9,14 @@ import { initTopbar } from './topbar'; import { initBlobRefSwitcher } from './under_topbar'; export const initSearchApp = () => { - const query = queryToObject(window.location.search); - const navigation = sidebarInitState(); + syntaxHighlight(document.querySelectorAll('.js-search-results')); + const query = queryToObject(window.location.search, { gatherArrays: true }); + const { navigationJsonParsed: navigation } = sidebarInitState() || {}; - const store = createStore({ query, navigation }); + const store = createStore({ + query, + navigation, + }); initTopbar(store); initSidebar(store); |