summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/notes.js12
-rw-r--r--spec/javascripts/notes_spec.js12
2 files changed, 0 insertions, 24 deletions
diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js
index 2b4a1a474e3..b29a27b7d37 100644
--- a/app/assets/javascripts/notes.js
+++ b/app/assets/javascripts/notes.js
@@ -1148,18 +1148,6 @@ const normalizeNewlines = function(str) {
};
/**
- * Remove slash commands and leave comment with pure message
- * this command is very less likely to be used in production
- * as gl.GfmAutoComplete.cachedData['/'] is initialized the moment
- * user starts typing any slash command, but during Karma tests
- * it is not available
- */
- Notes.prototype.stripSlashCommands = function (formContent) {
- const REGEX_SLASH_COMMANDS = /\/\w+/g;
- return formContent.replace(REGEX_SLASH_COMMANDS, '').trim();
- };
-
- /**
* Identify if formContent has any slash commands
* and generates placeholder note's content.
*/
diff --git a/spec/javascripts/notes_spec.js b/spec/javascripts/notes_spec.js
index 0c4cd07134f..12cf3661ed7 100644
--- a/spec/javascripts/notes_spec.js
+++ b/spec/javascripts/notes_spec.js
@@ -371,18 +371,6 @@ import '~/notes';
});
});
- describe('stripSlashCommands', () => {
- const REGEX_SLASH_COMMANDS = /\/\w+/g;
-
- it('should strip slash commands from the comment', () => {
- this.notes = new Notes();
- const sampleComment = '/wip /milestone %1.0 /merge /unassign Merging this';
- const stripedComment = this.notes.stripSlashCommands(sampleComment);
-
- expect(REGEX_SLASH_COMMANDS.test(stripedComment)).toBeFalsy();
- });
- });
-
describe('generatePlaceholderNoteContent', () => {
const availableSlashCommands = [
{ name: 'close', description: 'Close this issue', params: [] },