diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-12 15:06:26 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-12 15:06:26 +0000 |
commit | 69944ffb68788d190e81ff7e33db5dcb6c903184 (patch) | |
tree | 4112a1285f186c140749e8410a8a2788b6812500 /app/assets/javascripts/blob_edit | |
parent | 1b7381e998ff4b33ec8f633766030082e95f10c8 (diff) | |
download | gitlab-ce-69944ffb68788d190e81ff7e33db5dcb6c903184.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/blob_edit')
-rw-r--r-- | app/assets/javascripts/blob_edit/edit_blob.js | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/app/assets/javascripts/blob_edit/edit_blob.js b/app/assets/javascripts/blob_edit/edit_blob.js index 8561f650e8f..011898a5e7a 100644 --- a/app/assets/javascripts/blob_edit/edit_blob.js +++ b/app/assets/javascripts/blob_edit/edit_blob.js @@ -4,8 +4,7 @@ import $ from 'jquery'; import axios from '~/lib/utils/axios_utils'; import createFlash from '~/flash'; import { __ } from '~/locale'; -import { blobLinkRegex } from '~/blob/blob_utils'; -import TemplateSelectorMediator from '~/blob/file_template_mediator'; +import TemplateSelectorMediator from '../blob/file_template_mediator'; import getModeByFileExtension from '~/lib/utils/ace_utils'; import { addEditorMarkdownListeners } from '~/lib/utils/text_markdown'; @@ -18,7 +17,6 @@ export default class EditBlob { this.initModePanesAndLinks(); this.initSoftWrap(); this.initFileSelectors(); - this.initBlobContentLinkClickability(); } configureAceEditor() { @@ -91,22 +89,6 @@ export default class EditBlob { return this.editor.focus(); } - initBlobContentLinkClickability() { - this.editor.renderer.on('afterRender', () => { - document.querySelectorAll('.ace_text-layer .ace_line > *').forEach(token => { - if (token.dataset.linkified || !token.textContent.includes('http')) return; - - // eslint-disable-next-line no-param-reassign - token.innerHTML = token.innerHTML.replace( - blobLinkRegex, - '<a target="_blank" href="$&">$&</a>', - ); - // eslint-disable-next-line no-param-reassign - token.dataset.linkified = true; - }); - }); - } - initSoftWrap() { this.isSoftWrapped = false; this.$toggleButton = $('.soft-wrap-toggle'); |