summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-05-24 08:08:28 -0500
committerDouwe Maan <douwe@selenight.nl>2017-05-24 08:08:35 -0500
commit6ec1f1a7381565e01241d7e10067862e13cf8183 (patch)
treeeae37e1998fe3188a05961ea9f3b2e77877bea68 /app
parent850b99830ef34c3dad83cf08f2390dd67567b945 (diff)
downloadgitlab-ce-6ec1f1a7381565e01241d7e10067862e13cf8183.tar.gz
Remove unnecessary variabledm-copy-as-gfm-without-empty-elements
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/copy_as_gfm.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/assets/javascripts/copy_as_gfm.js b/app/assets/javascripts/copy_as_gfm.js
index 8ded09a7cc1..6790f6062b9 100644
--- a/app/assets/javascripts/copy_as_gfm.js
+++ b/app/assets/javascripts/copy_as_gfm.js
@@ -349,8 +349,6 @@ class CopyAsGFM {
}
static nodeToGFM(node, respectWhitespaceParam = false) {
- let respectWhitespace = respectWhitespaceParam;
-
if (node.nodeType === Node.COMMENT_NODE) {
return '';
}
@@ -359,7 +357,7 @@ class CopyAsGFM {
return node.textContent;
}
- respectWhitespace = respectWhitespace || (node.nodeName === 'PRE' || node.nodeName === 'CODE');
+ const respectWhitespace = respectWhitespaceParam || (node.nodeName === 'PRE' || node.nodeName === 'CODE');
const text = this.innerGFM(node, respectWhitespace);