summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Read <tread@gitlab.com>2019-07-11 12:59:46 +0100
committerTristan Read <tread@gitlab.com>2019-07-16 22:53:42 +0200
commitb5a0fbae66bff1292685c94d53adcb0814d71bc8 (patch)
tree4386187ebb8a20c1ed68201bd306d32f82fe1cd7
parent47624937c0fec8b836f9e586f06b33014da01ef5 (diff)
downloadgitlab-ce-b5a0fbae66bff1292685c94d53adcb0814d71bc8.tar.gz
Put gfm rendering behind a feature flag
-rw-r--r--app/assets/javascripts/behaviors/markdown/render_gfm.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/behaviors/markdown/render_gfm.js b/app/assets/javascripts/behaviors/markdown/render_gfm.js
index a87206c4b70..71c6dd62886 100644
--- a/app/assets/javascripts/behaviors/markdown/render_gfm.js
+++ b/app/assets/javascripts/behaviors/markdown/render_gfm.js
@@ -15,10 +15,12 @@ $.fn.renderGFM = function renderGFM() {
syntaxHighlight(this.find('.js-syntax-highlight'));
renderMath(this.find('.js-render-math'));
renderMermaid(this.find('.js-render-mermaid'));
- renderMetrics(this.find('.js-render-metrics').get());
highlightCurrentUser(this.find('.gfm-project_member').get());
initUserPopovers(this.find('.gfm-project_member').get());
initMRPopovers(this.find('.gfm-merge_request').get());
+ if (gon.features.gfmEmbeddedMetrics) {
+ renderMetrics(this.find('.js-render-metrics').get());
+ }
return this;
};