diff options
-rw-r--r-- | app/assets/javascripts/blob/viewer/index.js | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/app/assets/javascripts/blob/viewer/index.js b/app/assets/javascripts/blob/viewer/index.js index abf2f6aab6a..3eddf595f30 100644 --- a/app/assets/javascripts/blob/viewer/index.js +++ b/app/assets/javascripts/blob/viewer/index.js @@ -78,7 +78,7 @@ export default class BlobViewer { .fail(() => new Flash('Error loading source view')) .done((data) => { viewer.innerHTML = data.html; - $(viewer).syntaxHighlight(); + $(viewer).renderGFM(); viewer.setAttribute('data-loaded', 'true'); @@ -116,45 +116,6 @@ export default class BlobViewer { this.toggleCopyButtonState(); -<<<<<<< HEAD this.loadViewer(newViewer); -======= - BlobViewer.loadViewer(newViewer) - .then((viewer) => { - $(viewer).renderGFM(); - - this.$fileHolder.trigger('highlight:line'); - gl.utils.handleLocationHash(); - - this.toggleCopyButtonState(); - }) - .catch(() => new Flash('Error loading viewer')); - } - - static loadViewer(viewerParam) { - const viewer = viewerParam; - const url = viewer.getAttribute('data-url'); - - return new Promise((resolve, reject) => { - if (!url || viewer.getAttribute('data-loaded') || viewer.getAttribute('data-loading')) { - resolve(viewer); - return; - } - - viewer.setAttribute('data-loading', 'true'); - - $.ajax({ - url, - dataType: 'JSON', - }) - .fail(reject) - .done((data) => { - viewer.innerHTML = data.html; - viewer.setAttribute('data-loaded', 'true'); - - resolve(viewer); - }); - }); ->>>>>>> 83550c0... Merge branch '33048-markdown-rendering-of-md-files-has-ceased-to-display-latex-equations' into 'master' } } |