From 2d94e2c913417c2d1cce1bcc9c0ab4ede97a0d25 Mon Sep 17 00:00:00 2001 From: Illya Klymov Date: Wed, 11 Sep 2019 16:47:19 +0000 Subject: Add missing `render_gfm` import to files --- app/assets/javascripts/blob/viewer/index.js | 3 +-- app/assets/javascripts/notes/components/note_body.vue | 1 + app/assets/javascripts/vue_shared/components/markdown/field.vue | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/blob/viewer/index.js b/app/assets/javascripts/blob/viewer/index.js index d246a1f6064..9ea455069f3 100644 --- a/app/assets/javascripts/blob/viewer/index.js +++ b/app/assets/javascripts/blob/viewer/index.js @@ -1,4 +1,5 @@ import $ from 'jquery'; +import '~/behaviors/markdown/render_gfm'; import Flash from '../../flash'; import { handleLocationHash } from '../../lib/utils/common_utils'; import axios from '../../lib/utils/axios_utils'; @@ -105,7 +106,6 @@ export default class BlobViewer { toggleCopyButtonState() { if (!this.copySourceBtn) return; - if (this.simpleViewer.getAttribute('data-loaded')) { this.copySourceBtn.setAttribute('title', __('Copy source to clipboard')); this.copySourceBtn.classList.remove('disabled'); @@ -152,7 +152,6 @@ export default class BlobViewer { this.activeViewer = newViewer; this.toggleCopyButtonState(); - BlobViewer.loadViewer(newViewer) .then(viewer => { $(viewer).renderGFM(); diff --git a/app/assets/javascripts/notes/components/note_body.vue b/app/assets/javascripts/notes/components/note_body.vue index 88454c3fb4c..358f49deb35 100644 --- a/app/assets/javascripts/notes/components/note_body.vue +++ b/app/assets/javascripts/notes/components/note_body.vue @@ -1,6 +1,7 @@