Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-07-07 12:10:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-07-07 12:10:03 +0300
commitaeb70fd397271bef3857095468172e46a2965bc1 (patch)
tree8d43487030dd1482a5061570dfb979bd83d0124e /app/assets/javascripts/repository
parentf23de8014c9104ab62c68e88b4c8e924469cd996 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/repository')
-rw-r--r--app/assets/javascripts/repository/mixins/highlight_mixin.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/repository/mixins/highlight_mixin.js b/app/assets/javascripts/repository/mixins/highlight_mixin.js
index 232cb0dac03..822a8b4ee38 100644
--- a/app/assets/javascripts/repository/mixins/highlight_mixin.js
+++ b/app/assets/javascripts/repository/mixins/highlight_mixin.js
@@ -37,7 +37,7 @@ export default {
this.trackEvent(EVENT_LABEL_FALLBACK, language);
this?.onError();
},
- initHighlightWorker({ rawTextBlob, language, simpleViewer }) {
+ initHighlightWorker({ rawTextBlob, language, simpleViewer, fileType }) {
if (simpleViewer?.fileType !== TEXT_FILE_TYPE || !this.glFeatures.highlightJsWorker) return;
if (this.isUnsupportedLanguage(language)) {
@@ -71,14 +71,14 @@ export default {
this.instructWorker(firstSeventyLines, language);
// Instruct the worker to start highlighting all lines in the background.
- this.instructWorker(rawTextBlob, language);
+ this.instructWorker(rawTextBlob, language, fileType);
},
handleWorkerMessage({ data }) {
this.chunks = data;
this.highlightHash(); // highlight the line if a line number hash is present in the URL
},
- instructWorker(content, language) {
- this.highlightWorker.postMessage({ content, language });
+ instructWorker(content, language, fileType) {
+ this.highlightWorker.postMessage({ content, language, fileType });
},
async highlightHash() {
const { hash } = this.$route;