Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorConstance Okoghenun <cokoghenun@gitlab.com>2019-03-05 21:08:39 +0300
committerFilipa Lacerda <filipa@gitlab.com>2019-03-05 21:08:39 +0300
commite3eb241f5d71160db4535a4db19f0ea1944d2f0b (patch)
tree0b9ae4e31a7f550bb6da0f34c20d98f0095c9910 /app
parent4cfbe050a8d26ae9b3eec226e110dedba7a310d6 (diff)
Added tightLists option to copy_as_gfm markdown serializer
This removes extraneous newlines when copying comments with an ordered list.
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/behaviors/markdown/copy_as_gfm.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/behaviors/markdown/copy_as_gfm.js b/app/assets/javascripts/behaviors/markdown/copy_as_gfm.js
index 9482a9f166d..58cf057b2c2 100644
--- a/app/assets/javascripts/behaviors/markdown/copy_as_gfm.js
+++ b/app/assets/javascripts/behaviors/markdown/copy_as_gfm.js
@@ -173,7 +173,9 @@ export class CopyAsGFM {
wrapEl.appendChild(node.cloneNode(true));
const doc = DOMParser.fromSchema(schema.default).parse(wrapEl);
- const res = markdownSerializer.default.serialize(doc);
+ const res = markdownSerializer.default.serialize(doc, {
+ tightLists: true,
+ });
return res;
})
.catch(() => {});