From 1e0c6439ffc3b7d486a9fdd55392ac8f83fcb2b9 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Thu, 18 May 2017 08:10:59 +0000 Subject: Disable reference prefixes in notes for Snippets --- app/assets/javascripts/notes.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/assets/javascripts/notes.js') diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index 91d1afba7b6..766d71974d5 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -27,7 +27,7 @@ const normalizeNewlines = function(str) { Notes.interval = null; - function Notes(notes_url, note_ids, last_fetched_at, view) { + function Notes(notes_url, note_ids, last_fetched_at, view, enableGFM = true) { this.updateTargetButtons = this.updateTargetButtons.bind(this); this.updateComment = this.updateComment.bind(this); this.visibilityChange = this.visibilityChange.bind(this); @@ -50,6 +50,7 @@ const normalizeNewlines = function(str) { this.notes_url = notes_url; this.note_ids = note_ids; + this.enableGFM = enableGFM; // Used to keep track of updated notes while people are editing things this.updatedNotesTrackingMap = {}; this.last_fetched_at = last_fetched_at; @@ -523,7 +524,7 @@ const normalizeNewlines = function(str) { Notes.prototype.setupNoteForm = function(form) { var textarea, key; - new gl.GLForm(form); + new gl.GLForm(form, this.enableGFM); textarea = form.find(".js-note-text"); key = [ "Note", -- cgit v1.2.3